Android 检测任何应用程序的触摸状态
是否可以检测另一个应用程序中的触摸事件,特别是滑动?我希望能够检测用户是否向左或向右滑动(即使用两根手指 - 但不是必需的)。也许有我可以收听的服务或广播。
或者如果失败的话,是否有一些 API 也许我可以每秒轮询 10 次来获取触摸状态,然后我可以计算其余的(为什么,我记得在 8086 汇编程序中编写了一个鼠标驱动程序,使用 IN OUT 选通 COM1 端口,编码为XT 上的 TSR...)!
无论如何,任何帮助表示赞赏。 (我认为这可以通过劫持主启动器并进行透明的点击顶部活动来完成,但这是严重的欺诈行为,存在危险!)
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 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!)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
幸运的是,没有。
幸运的是,没有。
幸运的是,没有。
欢迎您编写自己的主屏幕应用程序,在这种情况下,您可以在自己的主屏幕上跟踪自己的触摸事件。欢迎您编写一个普通的应用程序并在您自己的活动上跟踪您自己的触摸事件。
Fortunately, no.
Fortunately, no.
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.