Condividi tramite


NotificationManager.RemoveAutomaticZenRule(String) Method

Definition

Deletes the automatic zen rule with the given id.

[Android.Runtime.Register("removeAutomaticZenRule", "(Ljava/lang/String;)Z", "GetRemoveAutomaticZenRule_Ljava_lang_String_Handler", ApiSince=24)]
public virtual bool RemoveAutomaticZenRule (string? id);
[<Android.Runtime.Register("removeAutomaticZenRule", "(Ljava/lang/String;)Z", "GetRemoveAutomaticZenRule_Ljava_lang_String_Handler", ApiSince=24)>]
abstract member RemoveAutomaticZenRule : string -> bool
override this.RemoveAutomaticZenRule : string -> bool

Parameters

id
String

the id of the rule to delete.

Returns

Whether the rule was successfully deleted.

Attributes

Remarks

Deletes the automatic zen rule with the given id.

Throws a SecurityException if policy access is not granted to this package. See #isNotificationPolicyAccessGranted.

Callers can only delete rules that they own. See AutomaticZenRule#getOwner.

Java documentation for android.app.NotificationManager.removeAutomaticZenRule(java.lang.String).

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