开发者

Activate Android with touch instead of power button

开发者 https://www.devze.com 2023-03-11 23:02 出处:网络
We\'ve got a tablet application for which we want to s开发者_JS百科creen to timeout after a certain period, but would like the user to re-enable it by touching the screen instead of the \'power\'-butt

We've got a tablet application for which we want to s开发者_JS百科creen to timeout after a certain period, but would like the user to re-enable it by touching the screen instead of the 'power'-button on the side of the device.

What's the best approach (battery performance) to this?

  1. Using a Partial Wake Lock (will the screen react?)
  2. Disable the screen in some way, but keep everything (including touch response) working?
  3. Other?

Any suggestions on this?


Gabriel,

Since this isn't possible by completely turning the screen off, you may want to just want to use a wake lock and dim the screen to its lowest setting as your 'timeout'. This way you can still accept screen touch events and 'wake' it from this state and bring it back to its previous brightness.


We've got a tablet application for which we want to screen to timeout after a certain period, but would like the user to re-enable it by touching the screen instead of the 'power'-button on the side of the device.

This is impossible except perhaps via custom firmware. If the screen is off, it will not respond to touch events.


Another thing you could do is use an app to turn screen off like ScreenStandby since it works in the background and can start on boot as well.

Out of curiosity, how can we go about contacting someone to help in creating a custom firmware like you did Gabriel?

0

精彩评论

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

关注公众号