2

Does Android provide a callback when the clear button on the notification list is clicked ? My app needs to clear some data whenever the notification is clicked or cleared. On clicking I know what to do, but how do I handle the second case ?

Tyler
  • 21,762
  • 11
  • 61
  • 90
pankajagarwal
  • 13,462
  • 14
  • 54
  • 65

1 Answers1

4

You can set a deleteIntent in the notification object. But haven't played with it yet.

public PendingIntent deleteIntent

Since: API Level 1

The intent to execute when the status entry is deleted by the user with the "Clear All Notifications" button. This probably shouldn't be launching an activity since several of those will be sent at the same time.

OneWorld
  • 17,512
  • 21
  • 86
  • 136