开发者

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

开发者 https://www.devze.com 2023-01-20 18:00 出处:网络
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开发者_运维知识库ckin

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.

0

精彩评论

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

关注公众号