Thanks for your reply.

I have all that set up. The thing is that if an user kills my app/
service with a task killer app, then my alarm would go away.

I would like to be able to do a check about whether I have a alarm
ready to go off at some point in the future. I do not want to re-set
the alarm if I know that one is already in place.

Something like:
AlarmManager mgr
=(AlarmManager)context.getSystemService(Context.ALARM_SERVICE);
if (mgr(with my pending intent).isActive()) {
    //all is good
}

Thanks,

Alberto


On Sep 10, 11:38 am, Kostya Vasilyev <kmans...@gmail.com> wrote:
> Setting an alarm cancels any previous alarms set with the same pending
> intent, where "same" has a certain definition.
>
> This means that it's OK to set your alarm if it's already set - this will
> not result in extraneous events.
>
> For initializing the alarm in the first place, implement a broadcast
> receiver for BOOT_COMPLETED.
>
> --
> Kostya Vasilyev --http://kmansoft.wordpress.com
>
> 10.09.2010 13:39 пользователь "Albert" <albert8...@googlemail.com> написал:
>
> Anyone? No hidden code to achieve the above?
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" ...

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