Re: [android-developers] Re: Preventing WakeLock Under-Locked exception

2010-02-05 Thread Robert Lau
On Feb 5, 2010 12:21 AM, "Chander Pechetty" wrote: release your lock in "onPause" and not in "onDestroy" as the activity won't be destroyed. On Feb 4, 10:42 pm, lipinski wrote: > Thanks, but my intent is to prevent... -- You received this message because you are subscribed to the Google Grou

Re: [android-developers] Re: Preventing WakeLock Under-Locked exception

2010-02-05 Thread Dianne Hackborn
setKeepScreenOn() does prevent it from locking; it is just another way of setting the window flag to keep the screen on. PLEASE use these APIs instead of wake locks if keeping the screen on is associated with an activity or window. There are so many advantages: no need to get an additional permis

[android-developers] Re: Preventing WakeLock Under-Locked exception

2010-02-05 Thread Chander Pechetty
release your lock in "onPause" and not in "onDestroy" as the activity won't be destroyed. On Feb 4, 10:42 pm, lipinski wrote: > Thanks, but my intent is to prevent the system from dimming/locking > the screen for a configurable amount of time - since there will likely > be no user activity. > > s

[android-developers] Re: Preventing WakeLock Under-Locked exception

2010-02-04 Thread lipinski
Thanks, but my intent is to prevent the system from dimming/locking the screen for a configurable amount of time - since there will likely be no user activity. setKeepScreenOn doesn't seem to indicate preventing screen lock. If I am wrong and there is a way to do this with setKeepScreenOn, please

[android-developers] Re: Preventing WakeLock Under-Locked exception

2010-02-04 Thread nikhil
If you want to keep the screen on you can use the setKeepScreenOn(true) method as well... On Feb 4, 7:58 am, lipinski wrote: > I'm trying to implement a times WakeLock in my Application, so this is > not a Service. > > I want the wakelock to simply prevent screen dimming for 3 min. > Looking thro