Global controller

I have an Android service that runs in the background. I need him to get feedback (and stop, for example) only when the user does something, regardless of whether he only touches an event on the main screen somewhere else or a keystroke.

Can I handle global touch events and keys?

+1
source share
1 answer

Although I doubt very much that there is an easy way to do this, you can record intentions and intercept messages for your own purpose. Look at the library of intentions for specific goals that you could capture for your application. You can find more information in the Android documentation on intent filters .

+1
source

Source: https://habr.com/ru/post/1369261/


All Articles