NotificationManager.AddAutomaticZenRule(AutomaticZenRule) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
.
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.