How to remove notification when user kills application

5

I have a notification that appears when a service is running and disappears when it stops running.

If the user kills the application with the service running, the notification stays there forever.

Is there a way to tell when the user killed the app so I can remove the notification? How can I get this event?

    
asked by anonymous 21.11.2014 / 14:41

1 answer

2

The onTaskRemoved () method of the service is executed when the application is removed from the recent ones.

I just removed the notification from it.

    
21.11.2014 / 19:10