NotificationManager.Cancel Method

Definition

Overloads

Name Description
Cancel(Int32)

Cancels a previously posted notification.

Cancel(String, Int32)

Cancels a previously posted notification.

Cancel(Int32)

Cancels a previously posted notification.

[Android.Runtime.Register("cancel", "(I)V", "GetCancel_IHandler")]
public virtual void Cancel(int id);
[<Android.Runtime.Register("cancel", "(I)V", "GetCancel_IHandler")>]
abstract member Cancel : int -> unit
override this.Cancel : int -> unit

Parameters

id
Int32

int

Attributes

Remarks

Cancels a previously posted notification. If the notification does not currently represent a foreground service or a user-initiated job, it will be removed from the UI and live notification listeners will be informed so they can remove the notification from their UIs.

Android reference for android.app.NotificationManager.cancel.

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

Cancel(String, Int32)

Cancels a previously posted notification.

[Android.Runtime.Register("cancel", "(Ljava/lang/String;I)V", "GetCancel_Ljava_lang_String_IHandler")]
public virtual void Cancel(string? tag, int id);
[<Android.Runtime.Register("cancel", "(Ljava/lang/String;I)V", "GetCancel_Ljava_lang_String_IHandler")>]
abstract member Cancel : string * int -> unit
override this.Cancel : string * int -> unit

Parameters

tag
String

String: This value may be null.

id
Int32

int

Attributes

Remarks

Cancels a previously posted notification. If the notification does not currently represent a foreground service or a user-initiated job, it will be removed from the UI and live notification listeners will be informed so they can remove the notification from their UIs.

Android reference for android.app.NotificationManager.cancel.

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