Listing all PendingIntents from AlarmManager [duplicate]
Po开发者_运维百科ssible 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.
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.
精彩评论