On Fri, Apr 22, 2011 at 12:47 AM, Zsolt Vasvari <[email protected]> wrote:

> How would that work?
>
> If the alarm is killed by the system for whatever reason, how would the
> preference let me know if I need to restart the alarm or not?
>

The preference would tell you the next time for which you had scheduled your
alarm. When your app is run, instead of setting it for +24 hours, you set it
based on the stored preference.

If the time in the preference is in the past, then something went wrong,
your alarm was killed and never fired so maybe your execute whatever it is
you do on the alarm trigger at that very moment.

However, If the time in preference is for the future, you're still on track
and you set the alarm again *for that specified time* instead of +24, under
the assumption that it may have been killed. When your alarm goes off, one
of the actions you take is to reset the alarm for the next run.

Yeah, I wouldn't use repeating alarms for what you cited - it's unreliable.

-------------------------------------------------------------------------------------------------
TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
transit tracking app for Android-powered devices

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