Gesture Listener across entire device

三世轮回 提交于 2019-12-02 02:25:53

问题


I was looking at an application (SwipePad), and noticed that after the application launches, it detects gestures across the entire platform, even after the main part of the application as been sent to the back (onPause... i.e. it isn't the current activity). It looks like it's using some kind of system service to keep itself alive, but how is it still getting the gesture from the bezel at the system level like that?

It also was interesting that the application itself isn't using root. Any thoughts?


回答1:


You can make layouts that can sit on top of all other windows. They will be running from a service.

Checkout: How to create an UI or a widget that sits on top of all applications in Android?



来源:https://stackoverflow.com/questions/11975865/gesture-listener-across-entire-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!