Turning sleep mode off in Android.
in
Android Processing
•
2 years ago
I'm making a simple thing for my new android phone that uses the accelerator to move a ball around the screen. The problem is that after a few seconds, the screen goes black and I need to press my back button to turn it back on. Is there any way to disable sleep mode while my game is running?
While googling around, I found this site here. It says something like "use this flag: WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON"
Anyone know what the heck this means or how I can use it?
I've seen soemthing like this implemented on games and other apps that I've downloaded for my phone, and I've seen soem sortof methods for doing this with java. Has nobody else come across this problem but me?
Apparently someone else has asked a similer question on here. But it seems they didn't get an answer either.
While googling around, I found this site here. It says something like "use this flag: WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON"
Anyone know what the heck this means or how I can use it?
I've seen soemthing like this implemented on games and other apps that I've downloaded for my phone, and I've seen soem sortof methods for doing this with java. Has nobody else come across this problem but me?
Apparently someone else has asked a similer question on here. But it seems they didn't get an answer either.
2