Touch event while display off

扶醉桌前 提交于 2019-11-26 23:38:27

问题


Sorry for stupid question, but can I listening touch events from android phone, while display is off? Or touch system works only when display is ON..?


回答1:


Only when the display is on since the touchscreen needs power to detect touches. However, there is some research to re-register the sensors when the screen is off, so maybe you'll have some luck if you follow that route.

Useful Resources:

  • Getting Android Sensor Events While The Screen is Off
  • Android docs - Partial wake lock
  • Example app on gitHub


来源:https://stackoverflow.com/questions/21572750/touch-event-while-display-off

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