Dela via


AlarmManager.Cancel Method

Definition

Overloads

Cancel(AlarmManager+IOnAlarmListener)

Remove any alarm scheduled to be delivered to the given OnAlarmListener.

Cancel(PendingIntent)

Remove any alarms with a matching Intent.

Cancel(AlarmManager+IOnAlarmListener)

Remove any alarm scheduled to be delivered to the given OnAlarmListener.

[Android.Runtime.Register("cancel", "(Landroid/app/AlarmManager$OnAlarmListener;)V", "GetCancel_Landroid_app_AlarmManager_OnAlarmListener_Handler", ApiSince=24)]
public virtual void Cancel (Android.App.AlarmManager.IOnAlarmListener listener);
[<Android.Runtime.Register("cancel", "(Landroid/app/AlarmManager$OnAlarmListener;)V", "GetCancel_Landroid_app_AlarmManager_OnAlarmListener_Handler", ApiSince=24)>]
abstract member Cancel : Android.App.AlarmManager.IOnAlarmListener -> unit
override this.Cancel : Android.App.AlarmManager.IOnAlarmListener -> unit

Parameters

listener
AlarmManager.IOnAlarmListener

OnAlarmListener instance that is the target of a currently-set alarm.

Attributes

Remarks

Java documentation for android.app.AlarmManager.cancel(android.app.OnAlarmListener).

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(PendingIntent)

Remove any alarms with a matching Intent.

[Android.Runtime.Register("cancel", "(Landroid/app/PendingIntent;)V", "GetCancel_Landroid_app_PendingIntent_Handler")]
public virtual void Cancel (Android.App.PendingIntent operation);
[<Android.Runtime.Register("cancel", "(Landroid/app/PendingIntent;)V", "GetCancel_Landroid_app_PendingIntent_Handler")>]
abstract member Cancel : Android.App.PendingIntent -> unit
override this.Cancel : Android.App.PendingIntent -> unit

Parameters

operation
PendingIntent

IntentSender which matches a previously added IntentSender. This parameter must not be null.

Attributes

Remarks

Remove any alarms with a matching Intent. Any alarm, of any type, whose Intent matches this one (as defined by Intent#filterEquals), will be canceled.

Java documentation for android.app.AlarmManager.cancel(android.app.PendingIntent).

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.

See also

  • <xref:Android.App.AlarmManager.Set(Android.App.AlarmType%2c+System.Int64%2c+System.Int64)>

Applies to