touch - Android: Background Service to Simulate Touches in Any App Underneath a Window -


i have service can draw canvas on top of applications using system_alert_window contains custom view.

my service , custom view both implement view.ontouchlistener

the ontouch(view v, motionevent ev){} method of service returns true while custom view returns false. allows me display custom view on top of apps , still interact underlying activity. part works.

i want service simulate touch event in specified coordinates in current activity underneath system_alert_window.

i hoping call view.dispatchtouchevent(...) on custom view , because ontouch(...) returns false, touch event passed on underlying activity. not work.

how can simulate touch events in activity in situation?

i have used code following sources...

draw canvas on top of applications:

http://www.piwai.info/chatheads-basics/

draw android canvas on top of applications?

passing touches underlying app:

how can interact elements behind translucent android app?

simulating touches:

how simulate touch event in android?

afaik, can't, obvious security reasons, except on rooted devices. accessibility apis don't support afaict. allowing arbitrary apps fake input other apps major security hole.

if objective during testing, instrumentation testing allows simulate touch events in own app.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -