How can a service listen for touch gestures/events?

前端 未结 5 1735
猫巷女王i
猫巷女王i 2020-11-29 16:29

I\'m wondering how apps like SwipePad and Wave Launcher are able to detect touch gestures/events simply through a service. These apps are able to detect a touch gestures eve

5条回答
  •  误落风尘
    2020-11-29 17:12

    Interesting question. I don't know how they did that and I found google group posts which tell me that there is no global touch listener. But I have an idea anyways...

    I found this post where someone succeeds to display a popupwindow from a service. If I would make that popup transparent and fullscreen, I'm sure I could capture the touches since I'm allowed to set a touch interceptor.

    Edit: Please report results when you try that, would be interesting to know if this works...

提交回复
热议问题