Android取消所有alarmmanager
我对 AlarmManager 中的 cancel() 有疑问,
当我设置闹钟时,我使用 AlarmManger,这是我的代码
StringBuilder q = new StringBuilder()
.append(time).append(".")
.append(day);
String action = q.toString();
Intent AlarmIntent = new Intent(Edit_Contract.this, ReceiverContract.class);
AlarmIntent.setAction(action);
AlarmManager AlmMgr = (AlarmManager)getSystemService(ALARM_SERVICE);
PendingIntent Sender = PendingIntent.getBroadcast(Edit_Contract.this, 0, AlarmIntent, PendingIntent.FLAG_UPDATE_CURRENT);
,然后,我想取消我设置的所有闹钟,我应该做什么
I've question with cancel() in AlarmManager
when I set alarm I use AlarmManger, this my code
StringBuilder q = new StringBuilder()
.append(time).append(".")
.append(day);
String action = q.toString();
Intent AlarmIntent = new Intent(Edit_Contract.this, ReceiverContract.class);
AlarmIntent.setAction(action);
AlarmManager AlmMgr = (AlarmManager)getSystemService(ALARM_SERVICE);
PendingIntent Sender = PendingIntent.getBroadcast(Edit_Contract.this, 0, AlarmIntent, PendingIntent.FLAG_UPDATE_CURRENT);
and then,I want to cancel all alarm which I set,what should I do
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您确定您确实对鼻子进行了研究吗?以下是我在 2 分钟的查找过程中发现的内容:Android:使用 AlarmManager 获取所有 PendingIntents 设置
Are you sure you sure you did the research on the nose? Here's what i found during 2 minutes of looking: Android: Get all PendingIntents set with AlarmManager