I unfortunately don't have any answer to your precise question. JBQ
On Mon, Nov 24, 2008 at 11:00 AM, Adam K <[EMAIL PROTECTED]> wrote: > Yes I realize this, which is why I have a 5 minute timeout on the wakelock > (and on the notification). I also have this as a preference for my app so > you can turn it on or off as suits you (some users specifically requested > this feaure). > > IMO, turning on the screen for a short period of time and optionally > displaying a message (on top of the keyguard) should be a part of a > Notification object. The built-in alarm does exactly this (which is > basically what I want to do - except if the user is playing a game or doing > something when my alarm goes I want to use the regular Notification manager > so as not to disrupt the user - something the built-in Alarm should probably > do ...) > > So back to my original question - is there a way to detect if the screen is > off? > > Adam > > On Mon, Nov 24, 2008 at 9:28 AM, Jean-Baptiste Queru <[EMAIL PROTECTED]> > wrote: >> >> Forcibly turning the screen on when you're not sure that the user is >> looking is a sure way to drain the battery in a few hours. You should >> probably avoid that. >> >> JBQ >> >> On Sun, Nov 23, 2008 at 8:52 AM, Adam K <[EMAIL PROTECTED]> >> wrote: >> > >> > Hi all, >> > >> > Is there a way to detect if the screen is off? I want to be able to >> > show a dialog if the screen is off (using a wakelock) but if the >> > screen is on I want to show a notification (so as not to interfere >> > with what the user is doing). >> > >> > Thanks, >> > >> > Adam >> > > >> > >> >> > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---