AutomaticZenRule.Builder.SetOwner(ComponentName) Method

Definition

Sets the component name of the ConditionProviderService that manages this rule (but note that ConditionProviderService is deprecated in favor of using NotificationManager.setAutomaticZenRuleState to notify the system about the state of your rule).

[Android.Runtime.Register("setOwner", "(Landroid/content/ComponentName;)Landroid/app/AutomaticZenRule$Builder;", "", ApiSince=35)]
public Android.App.AutomaticZenRule.Builder SetOwner(Android.Content.ComponentName? owner);
[<Android.Runtime.Register("setOwner", "(Landroid/content/ComponentName;)Landroid/app/AutomaticZenRule$Builder;", "", ApiSince=35)>]
member this.SetOwner : Android.Content.ComponentName -> Android.App.AutomaticZenRule.Builder

Parameters

owner
ComponentName

ComponentName: This value may be null.

Returns

This Android.App.AutomaticZenRule.Builder instance, allowing calls to be chained.

Attributes

Remarks

Sets the component name of the ConditionProviderService that manages this rule (but note that ConditionProviderService is deprecated in favor of using NotificationManager.setAutomaticZenRuleState to notify the system about the state of your rule). Although both are optional, at least one of setOwner(ComponentName) or setConfigurationActivity(ComponentName) must be provided. If both are set, setConfigurationActivity(ComponentName) supersedes this one, and the owner will not be used to determine whether the rule should be active. The system will validate that the provider ComponentName points to a valid and enabled ConditionProviderService when calling NotificationManager.addAutomaticZenRule(AutomaticZenRule) or NotificationManager.updateAutomaticZenRule(String,AutomaticZenRule).

Android reference for android.app.AutomaticZenRule.Builder.setOwner.

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