我在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);
然后,我想取消我设置的所有闹钟,我该怎么办
答案 0 :(得分:4)
你确定你确定你做过鼻子的研究吗?以下是我在2分钟内找到的内容:Android: Get all PendingIntents set with AlarmManager