AutomaticZenRule Constructors
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.
Overloads
| Name | Description |
|---|---|
| AutomaticZenRule(Parcel) |
Creates an automatic zen rule. |
| AutomaticZenRule(String, ComponentName, Uri, Int32, Boolean) |
This constructor is deprecated. |
| AutomaticZenRule(String, ComponentName, ComponentName, Uri, ZenPolicy, Int32, Boolean) |
Creates an automatic zen rule. |
AutomaticZenRule(Parcel)
Creates an automatic zen rule.
[Android.Runtime.Register(".ctor", "(Landroid/os/Parcel;)V", "", ApiSince=24)]
public AutomaticZenRule(Android.OS.Parcel? source);
[<Android.Runtime.Register(".ctor", "(Landroid/os/Parcel;)V", "", ApiSince=24)>]
new Android.App.AutomaticZenRule : Android.OS.Parcel -> Android.App.AutomaticZenRule
Parameters
- source
- Parcel
Parcel
- Attributes
Remarks
Android reference for android.app.AutomaticZenRule.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
AutomaticZenRule(String, ComponentName, Uri, Int32, Boolean)
This constructor is deprecated.
[Android.Runtime.Register(".ctor", "(Ljava/lang/String;Landroid/content/ComponentName;Landroid/net/Uri;IZ)V", "", ApiSince=24)]
public AutomaticZenRule(string? name, Android.Content.ComponentName? owner, Android.Net.Uri? conditionId, int interruptionFilter, bool enabled);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;Landroid/content/ComponentName;Landroid/net/Uri;IZ)V", "", ApiSince=24)>]
new Android.App.AutomaticZenRule : string * Android.Content.ComponentName * Android.Net.Uri * int * bool -> Android.App.AutomaticZenRule
Parameters
- name
- String
String: The name of the rule.
- owner
- ComponentName
ComponentName: The Condition Provider service that owns this rule.
- conditionId
- Uri
Uri
- interruptionFilter
- Int32
int: The interruption filter defines which notifications are allowed to interrupt the user (e.g. via sound & vibration) while this rule is active.
- enabled
- Boolean
boolean: Whether the rule is enabled.
- Attributes
Remarks
This constructor is deprecated. Use AutomaticZenRule.Builder to construct an AutomaticZenRule.
Creates an automatic zen rule.
Android reference for android.app.AutomaticZenRule.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
AutomaticZenRule(String, ComponentName, ComponentName, Uri, ZenPolicy, Int32, Boolean)
Creates an automatic zen rule.
[Android.Runtime.Register(".ctor", "(Ljava/lang/String;Landroid/content/ComponentName;Landroid/content/ComponentName;Landroid/net/Uri;Landroid/service/notification/ZenPolicy;IZ)V", "", ApiSince=29)]
public AutomaticZenRule(string name, Android.Content.ComponentName? owner, Android.Content.ComponentName? configurationActivity, Android.Net.Uri conditionId, Android.Service.Notification.ZenPolicy? policy, int interruptionFilter, bool enabled);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;Landroid/content/ComponentName;Landroid/content/ComponentName;Landroid/net/Uri;Landroid/service/notification/ZenPolicy;IZ)V", "", ApiSince=29)>]
new Android.App.AutomaticZenRule : string * Android.Content.ComponentName * Android.Content.ComponentName * Android.Net.Uri * Android.Service.Notification.ZenPolicy * int * bool -> Android.App.AutomaticZenRule
Parameters
- name
- String
String: The name of the rule. This value cannot be null.
- owner
- ComponentName
ComponentName: The Condition Provider service that owns this rule. This can be null if you're using NotificationManager.setAutomaticZenRuleState(String,Condition) instead of ConditionProviderService.
- configurationActivity
- ComponentName
ComponentName: An activity that handles NotificationManager.ACTION_AUTOMATIC_ZEN_RULE that shows the user more information about this rule and/or allows them to configure it. This is required if you are not using a ConditionProviderService. If you are, it overrides the information specified in your manifest. This value may be null.
- conditionId
- Uri
Uri: A representation of the state that should cause your app to apply the given interruption filter. This value cannot be null.
- policy
- ZenPolicy
ZenPolicy: The policy defines which notifications are allowed to interrupt the user while this rule is active. This overrides the global policy while this rule is action (Condition.STATE_TRUE). This value may be null.
- interruptionFilter
- Int32
int: The interruption filter defines which notifications are allowed to interrupt the user (e.g. via sound & vibration) while this rule is active.
- enabled
- Boolean
boolean: Whether the rule is enabled.
- Attributes
Remarks
Creates an automatic zen rule. Note: Prefer AutomaticZenRule.Builder to construct an AutomaticZenRule.
Android reference for android.app.AutomaticZenRule.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.