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 <[email protected]> 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 <[email protected]> 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 [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