In an android app, I create a notification when an app is moved to the background. When the notification is clicked, it moves the application back to the foreground.
The problem I have is in the background, and the user removes the app through "Recent apps" (i.e., he swipes it away), the notification stays. How can I capture the swipe event, i.e. when the app is removed from "Recent apps". I tried onDestroy, but that is not getting triggered.