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
AutomaticZenRule(Parcel) |
Creates an automatic zen rule. |
AutomaticZenRule(String, ComponentName, Uri, Int32, Boolean) |
Creates an automatic zen rule. |
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
- Attributes
Remarks
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)
Creates an automatic zen rule.
[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
The name of the rule.
- owner
- ComponentName
The Condition Provider service that owns this rule.
- conditionId
- Uri
A representation of the state that should cause your app to apply the given interruption filter.
- interruptionFilter
- Int32
The interruption filter defines which notifications are allowed to interrupt the user (e.g. via sound & vibration) while this rule is active.
- enabled
- Boolean
Whether the rule is enabled.
- Attributes
Remarks
Creates an automatic zen rule.
This member is deprecated. use #AutomaticZenRule(String, ComponentName, ComponentName, Uri, ZenPolicy, int, boolean)
.
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
The name of the rule.
- owner
- ComponentName
The Condition Provider service that owns this rule. This can be null if you're
using NotificationManager#setAutomaticZenRuleState(String, Condition)
instead of android.service.notification.ConditionProviderService
.
- configurationActivity
- 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
android.service.notification.ConditionProviderService
.
If you are, it overrides the information specified in your
manifest.
- conditionId
- Uri
A representation of the state that should cause your app to apply the given interruption filter.
- policy
- 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
).
- interruptionFilter
- Int32
The interruption filter defines which notifications are allowed to interrupt the user (e.g. via sound & vibration) while this rule is active.
- enabled
- Boolean
Whether the rule is enabled.
- Attributes
Remarks
Creates an automatic zen rule.
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.