Reputation: 1
I have created an application and with an Application class OnCreate event I manage to add notification in android notification bar. Now I need sample how to remove that notification from notification bar when the user stop the app from settings -> Application -> Running services
Upvotes: 0
Views: 338
Reputation: 618
You can remove your notification in the onDestroy() method of your activity by calling the cancelNotification() method from the NotificationListenerService
class
Upvotes: 1
Reputation: 1426
Please read this post here:
Cancel notification on remove application from multitask panel
it is the same procedure as with a multitask-panel kill.
Upvotes: 0