4

I create an alarm using AlarmManager.setAlarmClock(AlarmClockInfo, pendingIntent) and it works. The System also displays an alarm clock on the top-right part of the screen.

So far, so good, but how can I cancel that alarm? I tried using AlarmManager.cancel() but the icon on the top-right is still there. Any idea? Let's say the user doesn't want to scheduler the task anymore, so the icon should be gone.....

HINT: Cancel() seems to cancel alarms created by Set, SetExact, SetAllowWhileIdle... and all those. But here I am talking about setAlarmClock() which is a different story.

Ton
  • 8,783
  • 11
  • 53
  • 95
  • Possible duplicate of [Delete alarm from AlarmManager using cancel() - Android](http://stackoverflow.com/questions/14485368/delete-alarm-from-alarmmanager-using-cancel-android) – Vivek Mishra Jan 13 '17 at 09:13
  • 1
    Not duplicate. Your link cancels alarms created by setAlarm not by setAlarmClock – Ton Jan 13 '17 at 09:20

0 Answers0