NotificationManager.GetActiveNotifications 方法

定義

復原使用中通知的清單:使用者尚未 #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 ,包括原始 tagid 提供給 #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 屬性授權中所述的詞彙使用。

適用於