开发者

Android detecting the touch state from any application

Is it possible to detect touch events from within another application, specifically swipes? I'd like to be able to detect if the user has swiped left or right (even with 2 fingers - but 开发者_JS百科not required). Perhaps there is a service or broadcast I can listen to.

or failing that, is there some API perhaps that I can poll say 10 times a second to get the touch state and I can compute the rest (why, I remember writing a mouse driver strobing the COM1 port with IN OUTs in 8086 assembler coded in a TSR on a XT...)!

Anyway, any help appreciated. (I think it could be done by hijacking the primary Launcher and having a transparent click-through on-top activity, but that's seriously fraud with danger!)


Is it possible to detect touch events from within another application, specifically swipes?

Fortunately, no.

or failing that, is there some API perhaps that I can poll say 10 times a second to get the touch state and I can compute the rest

Fortunately, no.

I think it could be done by hijacking the primary Launcher and having a transparent click-through on-top activity

Fortunately, no.

You are welcome to write your own home screen application, in which case you can track your own touch events on your own home screen. You are welcome to write an ordinary application and track your own touch events on your own activities.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜