开发者

Listing all PendingIntents from AlarmManager [duplicate]

开发者 https://www.devze.com 2023-02-16 21:17 出处:网络
This question already has answers here: Closed 10 years ago. Po开发者_运维百科ssible Duplicate: Android: Get all PendingIntents set with AlarmManager
This question already has answers here: Closed 10 years ago.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号