user1594686
user1594686

Reputation: 1

Remove notification from android notification bar

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

Answers (2)

Kyle
Kyle

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

AndacAydin
AndacAydin

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

Related Questions