Language

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). When a non-system app adds a rule, Android requires a valid, enabled owner service or configuration activity. If a registered rule has both, the configuration activity supersedes the owner, and the owner will not be used to determine whether the rule should be active.

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