NotificationManager.GetActiveNotifications 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
恢复活动通知列表:已由调用应用发布的通知列表,该应用尚未被用户 #cancel(String, int)或应用关闭。
[Android.Runtime.Register("getActiveNotifications", "()[Landroid/service/notification/StatusBarNotification;", "GetGetActiveNotificationsHandler", ApiSince=23)]
public virtual Android.Service.Notification.StatusBarNotification[]? GetActiveNotifications();
[<Android.Runtime.Register("getActiveNotifications", "()[Landroid/service/notification/StatusBarNotification;", "GetGetActiveNotificationsHandler", ApiSince=23)>]
abstract member GetActiveNotifications : unit -> Android.Service.Notification.StatusBarNotification[]
override this.GetActiveNotifications : unit -> Android.Service.Notification.StatusBarNotification[]
返回
一个由 StatusBarNotification 构成的数组。
- 属性
注解
恢复活动通知列表:已由调用应用发布的通知列表,该应用尚未被用户 #cancel(String, int)或应用关闭。
<每个通知都嵌入在一个 StatusBarNotification 对象中,包括原始 tag 通知,以及 id 提供给 #notify(String, int, Notification) notify() (通过 StatusBarNotification#getTag() getTag() 和 StatusBarNotification#getId() getId())以及原始 Notification 对象的副本(通过 StatusBarNotification#getNotification())。
从 Build.VERSION_CODES#Q中,还会返回作为 NotificationManager#notifyAsPackage(String, String, int, Notification)应用通知委托发布的通知。
适用于 . 的 android.app.NotificationManager.getActiveNotifications()Java 文档
本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。