0

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

2 Answers2

1

You can remove your notification in the onDestroy() method of your activity by calling the cancelNotification() method from the NotificationListenerService class

Kyle
  • 598
  • 1
  • 7
  • 25
0

Please read this post here:

Cancel notification on remove application from multitask panel

it is the same procedure as with a multitask-panel kill.

Community
  • 1
  • 1
AndacAydin
  • 1,416
  • 19
  • 26