NotificationManager.UpdateAutomaticZenRule(String, 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.
Updates the given zen rule.
[Android.Runtime.Register("updateAutomaticZenRule", "(Ljava/lang/String;Landroid/app/AutomaticZenRule;)Z", "GetUpdateAutomaticZenRule_Ljava_lang_String_Landroid_app_AutomaticZenRule_Handler", ApiSince=24)]
public virtual bool UpdateAutomaticZenRule (string? id, Android.App.AutomaticZenRule? automaticZenRule);
[<Android.Runtime.Register("updateAutomaticZenRule", "(Ljava/lang/String;Landroid/app/AutomaticZenRule;)Z", "GetUpdateAutomaticZenRule_Ljava_lang_String_Landroid_app_AutomaticZenRule_Handler", ApiSince=24)>]
abstract member UpdateAutomaticZenRule : string * Android.App.AutomaticZenRule -> bool
override this.UpdateAutomaticZenRule : string * Android.App.AutomaticZenRule -> bool
Parameters
- id
- String
The id of the rule to update
- automaticZenRule
- AutomaticZenRule
the rule to update.
Returns
Whether the rule was successfully updated.
- Attributes
Remarks
Updates the given zen rule.
Throws a SecurityException if policy access is not granted to this package. See #isNotificationPolicyAccessGranted
.
Callers can only update rules that they own. See AutomaticZenRule#getOwner
.
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.