Android Jelly Bean service that receives all touch events

被刻印的时光 ゝ 提交于 2019-12-10 16:01:15

问题


I am an undergraduate research assistant working on an android accessibility project. My task involves collecting as much data about the user experience as possible, including touch events and other view interactions. I require 2 services: an accessibility service to gather details about the view current interaction, and a TouchListener service that is able to intercept MotionEvents.

My problem is with the TouchListener service. Is there any known way to intercept all touch events and pass them on to the current view?

Essentially, it seems like an invisible system-overlay view is needed to constantly listen for touch events, but the view can either intercept all touch events and NOT pass them to the view behind, or it can pass the even back and register the touch event as an ambiguous ACTION_OUTSIDE event, giving no details about the interaction.

My question is similar to this one, and the obstacle is discussed here. If anyone has found a work-around, please post!

来源:https://stackoverflow.com/questions/15737861/android-jelly-bean-service-that-receives-all-touch-events

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