NotificationManager.SetAutomaticZenRuleState(String, Condition) Method

Definition

Informs the notification manager that the state of an AutomaticZenRule has changed.

[Android.Runtime.Register("setAutomaticZenRuleState", "(Ljava/lang/String;Landroid/service/notification/Condition;)V", "GetSetAutomaticZenRuleState_Ljava_lang_String_Landroid_service_notification_Condition_Handler", ApiSince=29)]
public virtual void SetAutomaticZenRuleState (string id, Android.Service.Notification.Condition condition);
[<Android.Runtime.Register("setAutomaticZenRuleState", "(Ljava/lang/String;Landroid/service/notification/Condition;)V", "GetSetAutomaticZenRuleState_Ljava_lang_String_Landroid_service_notification_Condition_Handler", ApiSince=29)>]
abstract member SetAutomaticZenRuleState : string * Android.Service.Notification.Condition -> unit
override this.SetAutomaticZenRuleState : string * Android.Service.Notification.Condition -> unit

Parameters

id
String

The id of the rule whose state should change

condition
Condition

The new state of this rule

Attributes

Remarks

Informs the notification manager that the state of an AutomaticZenRule has changed. Use this method to put the system into Do Not Disturb mode or request that it exits Do Not Disturb mode. The calling app must own the provided android.app.AutomaticZenRule.

This method can be used in conjunction with or as a replacement to android.service.notification.ConditionProviderService#notifyCondition(Condition).

Java documentation for android.app.NotificationManager.setAutomaticZenRuleState(java.lang.String, android.service.notification.Condition).

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