开发者

System-wide TouchEvent on Android

开发者 https://www.devze.com 2023-01-14 17:40 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消