Hello,

I wanted to ask a question regarding the Alarm Manager. I have a
requirements of setting long running timers in my application. The minimum
duration for my timer is 1 hour...and the maximum may be for 4-5 days. This
timer is supposed to run in the background, and when it fires/expires, i
have to show something on the GUI. The timer can be re-scheduled once it
fires based on user action.

What is the best approach for scheduling such long running timers ?

Should i make use of the Alarm Manager ? Or will it be an overkill ? As far
as i know, alarms are retained even if the device goes to sleep and they
wake up the device when the alarm goes off.

I am thinking of using a simple Java TimerTask as an alternative to setting
an alarm: http://java.sun.com/j2se/1.5.0/docs/api/java/util/TimerTask.html.

But i am not sure what will happen to the timer task if the device went to
sleep while the task was running.

What is the best approach here ?

Thanks in advance

Best Regards

Indodroid.
-- 
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