I am making an app that allows the user to set an alarm based on GPS locations. I am having problems deleting the notifications I create and the alarms I set.
I have found that all the notifications and alarms are deleted permanently when I use the “Advanced Task Killer App”. I want to implement whatever it does into my app. Does anyone know what this app does and/or where I can find the source code?
Thanks in advance.
Did you try to post your notification with an integer ID?
Like so,
If that’s the case, you can simply get the notification manager to cancel them by calling
Also, make sure to use flags such as
Notification.FLAG_ONGOING_EVENTandNotification.FLAG_AUTO_CANCELappropriately. The ongoing flag makes the notification show up in on-going section, and auto cancel flag ensures the notification disappears when you click on it.