There isn't a way to do this; you will need to keep track of it yourself. Also I would recommend keeping track of which item you have enabled in your app, and only setting a single alarm for the next item in time, instead of having multiple in the alarm manager. See the alarm clock app for an example.
On Tue, Jun 22, 2010 at 1:30 AM, Jeruliu <jeru....@gmail.com> wrote: > 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<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- 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, and so won't reply to such e-mails. 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