开发者

Android wakelock question

开发者 https://www.devze.com 2023-02-03 22:22 出处:网络
Could someone please show me a sample code snippet where you use two bu开发者_JAVA百科ttons; one to turn off and one to turn on the screen. I cant get it to work. Thanks!I don\'t understand your quest

Could someone please show me a sample code snippet where you use two bu开发者_JAVA百科ttons; one to turn off and one to turn on the screen. I cant get it to work. Thanks!


I don't understand your question properly. A wake lock is set in your application so that the device screen does not turn off after a particular span of time. how ever you are advised to use this FLAG_KEEP_SCREEN_ON flag and is the best way

Force Screen On


Erm, when the screen is off, how are you hoping to display a button? Unless you mean hardware buttons, in which case I think only the power button can turn the screen back on.

0

精彩评论

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