NotificationListenerService.OnNotificationPosted Method

Definition

Overloads

OnNotificationPosted(StatusBarNotification)

Implement this method to learn about new notifications as they are posted by apps.

OnNotificationPosted(StatusBarNotification, NotificationListenerService+RankingMap)

Implement this method to learn about new notifications as they are posted by apps.

OnNotificationPosted(StatusBarNotification)

Implement this method to learn about new notifications as they are posted by apps.

[Android.Runtime.Register("onNotificationPosted", "(Landroid/service/notification/StatusBarNotification;)V", "GetOnNotificationPosted_Landroid_service_notification_StatusBarNotification_Handler")]
public virtual void OnNotificationPosted (Android.Service.Notification.StatusBarNotification? sbn);
[<Android.Runtime.Register("onNotificationPosted", "(Landroid/service/notification/StatusBarNotification;)V", "GetOnNotificationPosted_Landroid_service_notification_StatusBarNotification_Handler")>]
abstract member OnNotificationPosted : Android.Service.Notification.StatusBarNotification -> unit
override this.OnNotificationPosted : Android.Service.Notification.StatusBarNotification -> unit

Parameters

sbn
StatusBarNotification

A data structure encapsulating the original android.app.Notification object as well as its identifying information (tag and id) and source (package name).

Attributes

Remarks

Implement this method to learn about new notifications as they are posted by apps.

Java documentation for android.service.notification.NotificationListenerService.onNotificationPosted(android.service.notification.StatusBarNotification).

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

OnNotificationPosted(StatusBarNotification, NotificationListenerService+RankingMap)

Implement this method to learn about new notifications as they are posted by apps.

[Android.Runtime.Register("onNotificationPosted", "(Landroid/service/notification/StatusBarNotification;Landroid/service/notification/NotificationListenerService$RankingMap;)V", "GetOnNotificationPosted_Landroid_service_notification_StatusBarNotification_Landroid_service_notification_NotificationListenerService_RankingMap_Handler")]
public virtual void OnNotificationPosted (Android.Service.Notification.StatusBarNotification? sbn, Android.Service.Notification.NotificationListenerService.RankingMap? rankingMap);
[<Android.Runtime.Register("onNotificationPosted", "(Landroid/service/notification/StatusBarNotification;Landroid/service/notification/NotificationListenerService$RankingMap;)V", "GetOnNotificationPosted_Landroid_service_notification_StatusBarNotification_Landroid_service_notification_NotificationListenerService_RankingMap_Handler")>]
abstract member OnNotificationPosted : Android.Service.Notification.StatusBarNotification * Android.Service.Notification.NotificationListenerService.RankingMap -> unit
override this.OnNotificationPosted : Android.Service.Notification.StatusBarNotification * Android.Service.Notification.NotificationListenerService.RankingMap -> unit

Parameters

sbn
StatusBarNotification

A data structure encapsulating the original android.app.Notification object as well as its identifying information (tag and id) and source (package name).

rankingMap
NotificationListenerService.RankingMap

The current ranking map that can be used to retrieve ranking information for active notifications, including the newly posted one.

Attributes

Remarks

Java documentation for android.service.notification.NotificationListenerService.onNotificationPosted(android.service.notification.StatusBarNotification).

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