Udostępnij za pośrednictwem


NotificationManager.AddAutomaticZenRule(AutomaticZenRule) Method

Definition

Creates the given zen rule.

[Android.Runtime.Register("addAutomaticZenRule", "(Landroid/app/AutomaticZenRule;)Ljava/lang/String;", "GetAddAutomaticZenRule_Landroid_app_AutomaticZenRule_Handler", ApiSince=24)]
public virtual string? AddAutomaticZenRule (Android.App.AutomaticZenRule? automaticZenRule);
[<Android.Runtime.Register("addAutomaticZenRule", "(Landroid/app/AutomaticZenRule;)Ljava/lang/String;", "GetAddAutomaticZenRule_Landroid_app_AutomaticZenRule_Handler", ApiSince=24)>]
abstract member AddAutomaticZenRule : Android.App.AutomaticZenRule -> string
override this.AddAutomaticZenRule : Android.App.AutomaticZenRule -> string

Parameters

automaticZenRule
AutomaticZenRule

the rule to create.

Returns

The id of the newly created rule; null if the rule could not be created.

Attributes

Remarks

Creates the given zen rule.

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

Java documentation for android.app.NotificationManager.addAutomaticZenRule(android.app.AutomaticZenRule).

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