I started by using timer() but that done the same thing, basically when the
times up it makes a noise then starts the next timer in a que (Intervals),
but I would like this to happen when the screen goes blank.

On 20 November 2010 21:03, Mark Murphy <[email protected]> wrote:

> On Sat, Nov 20, 2010 at 3:58 PM, Paul Townsend <[email protected]> wrote:
> > I made a simple countdown timer and it works as expected when plugged
> > in via usb for debugging but when I take it off debugging and the
> > screen goes off either time out or power button the handler fails to
> > fire at the end time. I have created a custom timer class that gets
> > created from the main activity when needed, because its able to have
> > multiple countdowns running at the same time. Am I right in thinking
> > that the handler just gets paused when the screen goes off and if so
> > what are my alternatives. The activity is still in the foreground and
> > I assumed the handler would still fire if the screen goes off.
>
> Your problem is not that the screen is turning off. Your problem is
> that the CPU is stopping as part of sleep mode. This is generally A
> Really Good Thing from a power management standpoint.
>
> What are you trying to accomplish via postDelayed() that is supposed
> to keep going after the device falls asleep?
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 3.2 Available!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
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

Reply via email to