Yes, just schedule a new alarm each time with the exact time you want if it
is critical for you.

On Mon, Feb 9, 2009 at 2:25 PM, lorenz <lorenz.fisc...@gmail.com> wrote:

>
> Hey
>
> I'm looking for a way to trigger repeated actions. I'd like the user
> to be able to choose the intervals at which these actions will be
> executed. One should be able to choose from intervals like "Every
> Day", "Every Month", and "Every Year". The setRepeating(int, long,
> long, PendingIntent) method of the android.app.AlarmManager class only
> supports a long value for choosing the interval between the execution
> of the pending intent. My problem now is, that I can not just compute
> the number of milliseconds that "fit into one day", since not all days
> have the same length (daylight saving). This is also a problem for the
> interval type "year" (leap years).
>
> I had a quick look at the android.os.Handler class, but as I
> understood the documentation I'd need to keep a service thread running
> for my actions to be executed at some future time. I don't consider
> that a good option for my needs ;-)
>
> Is there anything in the API I could configure with a cron expression
> or the like?
>
> I was also thinking about scheduling an alarm with the AlarmManager
> for a single execution at a given date/time and then having a receiver
> that does the rescheduling according to a cron expression attached to
> the intent. But I don't know if I just got something completely wrong
> here and I'm reinventing the wheel with that approach :-/
>
> Any advice or pointers would be greatly appreciated :-)
>
> Cheers
> Lorenz
>
> >
>


-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

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