How do I get touch events like you can from an Activity using public boolean onTouchEvent(MotionEvent event)
? There obviously isn't an onTouchEvent
method to override in a service, so how can I go about doing this? Is there a direct way or a reliable work-around?
My idea is to create a service that listens in the background for the user to make a certain gesture, then do something when that user has made the correct gesture. Thank you!
EDIT: This question is intended for the answer to this question.