System-wide TouchEvent on Android
I'd like to receive a TouchEvent in my Android application any time the screen is touched. Even if my application is not in focus.
Is there an general even listener or intent filter I can write to achieve this?
The goal is to write system wide gesture engine. So for example, if the user swiped up and then down, a certain applicatio开发者_StackOverflow中文版n would be launched regardless of where the user is.
Thank you,
I'd like to receive a TouchEvent in my Android application any time the screen is touched. Even if my application is not in focus.
This is not possible from an SDK application. You are welcome to add this to your own custom firmware, though.
You can however build your own Launcher application by either forking the existing or coding one from scratch with your gesture functionality.
It will only work from the launcher tho. This is the only possibility if you want to have such a feature without building your own custom firmware.
精彩评论