I have a game that uses the accelerometer to move a guy back and forth on the screen. After a few seconds the screen goes dim. Is there any way to keep it alive and bright during the game activity?
Tell me more
×
Game Development Stack Exchange is a question and answer site for
professional and independent game developers. It's 100% free, no registration required.
|
With the PowerManager API, you can acquire and release locks to:
Warning you must add one permission:
|
||||
|
|
|
I try like that in oncreate on activity start
|
|||
|
|
|
This blog post covers the three ways of achieving this: http://blog.blundell-apps.com/tut-keep-screen-onawake-3-possible-ways/ Basically, you either:
|
|||
|
|
