2

Possible Duplicate:
Android: Get all PendingIntents set with AlarmManager

I am looking to list all pending alarms set in my app, so later i can add a cancel button for each individual alarm.

The problem is, I'm not sure how this would be done at all, and have no idea where to start.

I would be grateful for any pointers in the right direction.

Thankyou.

Community
  • 1
  • 1
Jez Fischer
  • 657
  • 1
  • 8
  • 18

1 Answers1

3

Step #1: Record all PendingIntents that you register with AlarmManager.

Step #2: Use the results from Step #1 for your cancel buttons.

There is no way to query AlarmManager for scheduled alarms -- you have to track those yourself.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • 6
    'adb shell dumpsys' -- look for "Current Alarm Manager state:" – Schildmeijer Apr 11 '11 at 11:24
  • 1
    I do not understand why it is not possible to query AlarmManager to get alarms. It is so bad that I cannot find my alarms there and I always have to keep a reference of my alarms. – Arashsoft Dec 09 '16 at 16:04