开发者

Android Alert manager delete

开发者 https://www.devze.com 2023-02-18 09:44 出处:网络
I have set an alert manager for every event created by user. If any user delete the event after that, I want to delete the alert manager set for the specific event. How to 开发者_开发百科delete any sp

I have set an alert manager for every event created by user. If any user delete the event after that, I want to delete the alert manager set for the specific event. How to 开发者_开发百科delete any specific alert programmatically?


I have set an alert manager for every event created by user.

I am going to assume that you really mean that you have set an alarm with AlarmManager.

How to delete any specific alert programmatically?

Call cancel() on AlarmManager with a PendingIntent for an equivalent Intent. Here is a sample project that demonstrates this (see OnBootReceiver.java).

0

精彩评论

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