-1

In my app I want to detect the swipes done by user by using GestureEvent method with OnTouchEvent method.The OnTouchEvent works only in activity class when I try to implement it in service class it doesn't implement.How to implement onTouchEvent in service class. Please help me.

Adarsh
  • 45
  • 1
  • 6

1 Answers1

1

I don't think it is possible. You should handle the GestureEvent in the activity and implement some sort of communication between your activity and the service.

This might help you: https://stackoverflow.com/a/29101448/2442831

Community
  • 1
  • 1
Lino
  • 5,084
  • 3
  • 21
  • 39