Maybe i didn't make myself clearly.

I have no problem to set multiple PendingIntent into the AlarmManager,
my solution is to set a dummy action: intent.setAction("DUMMY");

But the question in this post is: I need to know if the specific
PendingIntent is active or not

I wish to display the PendingIntent status on my screen as active /
inactive


On Jun 22, 2:56 pm, reda <reda.a...@gmail.com> wrote:
> Hi ,
>
> I've faced this problem and what I did is just creating the intent and
> the pendingIntent the same manner I did the first time and now I can
> cancel it.
>
> Intent intentToFire = new Intent(Main.ACTION_GET_NEW_EGGS);
>                         PendingIntent alarmPendingIntent =
> PendingIntent.getBroadcast(getApplicationContext(), 0, intentToFire,
> PendingIntent.FLAG_UPDATE_CURRENT);
>                         alarmPendingIntent.cancel();
>
> It just works for me but I want to hear from other if this will not
> fail one day.
>
> ++
> Reda
>
> On 22 juin, 08:08, Jeruliu <jeru....@gmail.com> wrote:
>
> > Dear all,
>
> > I used AlarmManager to set the pending intent.
>
> > I need to find out the state of the pending intent, in other word, is
> > this pending intent working or not.
> > Boz i may need to cancel this pending intent, but before canceling it
> > i want to make sure it's active.
>
> > But i see no function in AlarmManager can read this status.
>
> > Can anyone advice how to do that?
>
> > Thanks

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