本文介绍了Android版是否提供了一个回调点击通知列表中清除按钮时,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否提供Android的通知名单上的清除按钮被点击时的回调?我的应用程序需要明确每当通知被点击或清除一些数据。在点击我知道该怎么做,但我要如何处理第二个情况?

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 ?

推荐答案

您可以在通知对象设置了 deleteIntent 。但没有发挥它呢。

You can set a deleteIntent in the notification object. But haven't played with it yet.

公开的PendingIntent

public PendingIntent deleteIntent

自:API等级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.

这篇关于Android版是否提供了一个回调点击通知列表中清除按钮时,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 08:41