NotificationListenerService.GetActiveNotifications Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetActiveNotifications() |
Request the list of outstanding notifications (that is, those that are visible to the current user). |
GetActiveNotifications(String[]) |
Request one or more notifications by key. |
GetActiveNotifications()
Request the list of outstanding notifications (that is, those that are visible to the current user).
[Android.Runtime.Register("getActiveNotifications", "()[Landroid/service/notification/StatusBarNotification;", "GetGetActiveNotificationsHandler")]
public virtual Android.Service.Notification.StatusBarNotification[]? GetActiveNotifications ();
[<Android.Runtime.Register("getActiveNotifications", "()[Landroid/service/notification/StatusBarNotification;", "GetGetActiveNotificationsHandler")>]
abstract member GetActiveNotifications : unit -> Android.Service.Notification.StatusBarNotification[]
override this.GetActiveNotifications : unit -> Android.Service.Notification.StatusBarNotification[]
Returns
An array of active notifications, sorted in natural order.
- Attributes
Remarks
Request the list of outstanding notifications (that is, those that are visible to the current user). Useful when you don't know what's already been posted.
The service should wait for the #onListenerConnected()
event before performing this operation.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
GetActiveNotifications(String[])
Request one or more notifications by key.
[Android.Runtime.Register("getActiveNotifications", "([Ljava/lang/String;)[Landroid/service/notification/StatusBarNotification;", "GetGetActiveNotifications_arrayLjava_lang_String_Handler")]
public virtual Android.Service.Notification.StatusBarNotification[]? GetActiveNotifications (string[]? keys);
[<Android.Runtime.Register("getActiveNotifications", "([Ljava/lang/String;)[Landroid/service/notification/StatusBarNotification;", "GetGetActiveNotifications_arrayLjava_lang_String_Handler")>]
abstract member GetActiveNotifications : string[] -> Android.Service.Notification.StatusBarNotification[]
override this.GetActiveNotifications : string[] -> Android.Service.Notification.StatusBarNotification[]
Parameters
- keys
- String[]
the keys of the notifications to request
Returns
An array of notifications corresponding to the requested keys, in the same order as the key list.
- Attributes
Remarks
Request one or more notifications by key. Useful if you have been keeping track of notifications but didn't want to retain the bits, and now need to go back and extract more data out of those notifications.
The service should wait for the #onListenerConnected()
event before performing this operation.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.