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 si...