Search code examples
androidnotificationsdetect

Detect delete notifications button


Can I detect in my service when the user has pressed the "delete" button in notification bar to clean icon notification? It is a notification my service previously put there.


Solution

  • Use deleteIntent on the Notification to specify a PendingIntent to be invoked when the user clears it.