My Android app runs 50% of the time in background, and has a notification that, when I press it, pops up the main activity BusMap
via a PendingIntent
. Now, I also want to close the app when I remove the notification by sliding it to prevent it to run in the background. I don't want to create broadcasts just for this. I tried adding .setDeleteIntent(quitpendingintent)
to the same notification builder, but failed.
Is there a "natural" way to do this?