Could someone please show me a sample code snippet where you use two buttons; one to turn off and one to turn on the screen. I cant get it to work. Thanks!
Asked
Active
Viewed 769 times
2 Answers
0
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
-
Poor explanation, my bad. I would like a timer to turn on and off the screen at certain points of the day. For example: If (hourOfDay == 12) screen = on; else off – Johan Jan 10 '11 at 12:17
0
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.

ShibbyUK
- 1,501
- 9
- 12