NotificationListenerService.OnNotificationPosted 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
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
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.
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
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
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.