Share via


NotificationManager.Notify Method

Definition

Overloads

Notify(String, Int32, Notification)

Posts a notification to be shown in the status bar.

Notify(Int32, Notification)

Post a notification to be shown in the status bar.

Notify(String, Int32, Notification)

Posts a notification to be shown in the status bar.

[Android.Runtime.Register("notify", "(Ljava/lang/String;ILandroid/app/Notification;)V", "GetNotify_Ljava_lang_String_ILandroid_app_Notification_Handler")]
public virtual void Notify (string? tag, int id, Android.App.Notification? notification);
[<Android.Runtime.Register("notify", "(Ljava/lang/String;ILandroid/app/Notification;)V", "GetNotify_Ljava_lang_String_ILandroid_app_Notification_Handler")>]
override this.Notify : string * int * Android.App.Notification -> unit

Parameters

tag
String

A string identifier for this notification. May be null.

id
Int32

An identifier for this notification. The pair (tag, id) must be unique within your application.

notification
Notification

A Notification object describing what to show the user. Must not be null.

Attributes

Remarks

Posts a notification to be shown in the status bar. If a notification with the same tag and id has already been posted by your application and has not yet been canceled, it will be replaced by the updated information.

All android.service.notification.NotificationListenerService listener services will be granted Intent#FLAG_GRANT_READ_URI_PERMISSION access to any Uri uris provided on this notification or the NotificationChannel this notification is posted to using Context#grantUriPermission(String, Uri, int). Permission will be revoked when the notification is canceled, or you can revoke permissions with Context#revokeUriPermission(Uri, int).

Java documentation for android.app.NotificationManager.notify(java.lang.String, int, android.app.Notification).

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

Notify(Int32, Notification)

Post a notification to be shown in the status bar.

[Android.Runtime.Register("notify", "(ILandroid/app/Notification;)V", "GetNotify_ILandroid_app_Notification_Handler")]
public virtual void Notify (int id, Android.App.Notification? notification);
[<Android.Runtime.Register("notify", "(ILandroid/app/Notification;)V", "GetNotify_ILandroid_app_Notification_Handler")>]
override this.Notify : int * Android.App.Notification -> unit

Parameters

id
Int32

An identifier for this notification unique within your application.

notification
Notification

A Notification object describing what to show the user. Must not be null.

Attributes

Remarks

Post a notification to be shown in the status bar. If a notification with the same id has already been posted by your application and has not yet been canceled, it will be replaced by the updated information.

Java documentation for android.app.NotificationManager.notify(int, android.app.Notification).

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