How to know when my notification is cleared via Clear button?
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.
It seems like you are looking for the deleteIntent field of the Notification
class.
精彩评论