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 cli开发者_运维知识库cking I know what to do, but how do I handle the second case ?
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.
精彩评论