开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜