确定和取消警报发送到AlarmManager [英] Identify and cancel an alarm send to an AlarmManager

查看:179
本文介绍了确定和取消警报发送到AlarmManager的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我用AlarmManager安排警报(一PendintIntent应发),我怎么能确定报警后,取消了吗?我可以取消定于我的应用程序的所有报警?

If I use the AlarmManager to schedule an alarm (a PendintIntent which should be send), how can I identify that alarm later to cancel it? Can I cancel all alarms scheduled by my app?

推荐答案

您可能希望有一个仔细看看<一href="http://developer.android.com/reference/android/app/AlarmManager.html#cancel%28android.app.PendingIntent%29"><$c$c>AlarmManager.cancel(PendingIntent操作) 功能。

You probably want to have a closer look at the AlarmManager.cancel(PendingIntent operation) function.

这篇关于确定和取消警报发送到AlarmManager的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆