Android Question Cancelling (clearing) a notification with an action button

dbprogramer

Member
Licensed User
Longtime User
My notification (a daily reminder) worked fine until I added an action button (addaction2, calls a service module) -- I wanted to add a "Pause" button, which shows the notification again in 15 minutes (in case you are busy when it first shows up); now when the Pause button is pushed, the notification does not go away (and so far I haven't been able to reset the notification to go off again). Sorry I haven't been able to find any examples of how to do this. Thanks for any advice.

Edit. okay, learned how to properly reference the original notification and cancel it (module.nb.Cancel(1)) when the action button is pressed, then my other code continued as expected (resetting the notification). Now it works.
 
Last edited:
Top