>
>  Finally, for something like a countdown timer, you really might want to
> consider using the alarm manager so you don't need to keep your app running
> at all while it is in the background.  That is the kind of thing a well
> behaving Android app will do.  To be able to show the remaining time if the
> user returns to your activity, you can store on SharedPreferences the time
> the countdown was started.
>
> Using the alarm manager is also the only way you can make sure you execute
> when the time expires, even if the user has turned off the phone.
>
As it happens I am writting a countdown timer that implements a repeating
notification at quite short interface.  For example the application might
chirp every 10 seconds.  This is used for certain breathing excercises where
you hold the breath for 10 seconds, breathe out for 10 seconds, in for 10
seconds etc.

For such short intervals would I still be better off using the alarm
manager?  The handler technique seems to work great for my purposes but I
want to make sure I write a well behaved app.

John

--~--~---------~--~----~------------~-------~--~----~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to