pankajagarwal
pankajagarwal

Reputation: 13582

Does Android provide a callback when the clear button on notifications list is clicked

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 ?

Upvotes: 2

Views: 1485

Answers (1)

OneWorld
OneWorld

Reputation: 17671

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.

Upvotes: 4

Related Questions