12

I have created a notification and added a PendingIntent so that the notification is closed when the notification is selected in expanded view.

My problem is that when the user clicks the Clear button to remove all notifications I am not notified and I need to perform some cleanup when my notification is killed.

FLAG_NO_CLEAR would enable me to ignore the Clear button and keep my notification but I'd prefer to have my Intent triggered correctly to allow cleanup.

Octavian Helm
  • 39,405
  • 19
  • 98
  • 102
pocketDev
  • 205
  • 2
  • 10

1 Answers1

23

It seems like you are looking for the deleteIntent field of the Notification class.

Octavian Helm
  • 39,405
  • 19
  • 98
  • 102