[android-developers] preventing screen shutdown

2011-04-01 Thread bob
I'm writing a game for Android that uses the accelerometer. However, the phone keeps turning off the screen after about 5 seconds and locking up. Anyone know how to stop it from doing this? -- You received this message because you are subscribed to the Google Groups Android Developers group.

Re: [android-developers] preventing screen shutdown

2011-04-01 Thread Mark Murphy
For a game, add android:keepScreenOn=true to one of the widgets in your layout. On Fri, Apr 1, 2011 at 5:49 PM, bob b...@coolgroups.com wrote: I'm writing a game for Android that uses the accelerometer.  However, the phone keeps turning off the screen after about 5 seconds and locking up.  

Re: [android-developers] preventing screen shutdown

2011-04-01 Thread Filip Havlicek
Hi bob, check this out http://developer.android.com/reference/android/os/PowerManager.html Best regards, Filip Havlicek 2011/4/1 bob b...@coolgroups.com I'm writing a game for Android that uses the accelerometer. However, the phone keeps turning off the screen after about 5 seconds and

Re: [android-developers] preventing screen shutdown

2011-04-01 Thread Dianne Hackborn
On Fri, Apr 1, 2011 at 2:52 PM, Filip Havlicek havlicek.fi...@gmail.comwrote: check this out http://developer.android.com/reference/android/os/PowerManager.html No, please don't. I am sad every time I see a game requesting the power permission. It is not needed. Just set the flag on your