NotificationManager.GetActiveNotifications 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
恢复活动通知列表:由尚未由用户关闭的调用应用发布的通知列表,或由应用取消(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 的数组。
- 特性
注解
恢复活动通知列表:由尚未由用户关闭的调用应用发布的通知列表,或由应用取消(String,int)发布。 每个通知都嵌入在 StatusBarNotification 对象中,包括提供给 notify()(通过 getTag()和 getId()的原始标记和 ID,以及原始通知对象的副本(通过 StatusBarNotification.getNotification())。
从Build.VERSION_CODES。问,还会返回通过 NotificationManager.notifyAsPackage(String,String,int,Notification)作为应用的通知委托发布的通知。
Android 参考。android.app.NotificationManager.getActiveNotifications
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。