AutomaticZenRule.Builder.SetOwner(ComponentName) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
設定管理此規則的 ConditionProviderService 元件名稱(但請注意,ConditionProviderService 已被棄用,改用 NotificationManager.setAutomaticZenRuleState 來通知系統規則狀態)。
[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
參數
- owner
- ComponentName
ComponentName:此值可能是空值。
傳回
這個 Android.App.AutomaticZenRule.Builder 實例,允許通話串接。
- 屬性
備註
設定管理此規則的 ConditionProviderService 元件名稱(但請注意,ConditionProviderService 已被棄用,改用 NotificationManager.setAutomaticZenRuleState 來通知系統規則狀態)。 雖然兩者皆為可選,但至少必須提供 setOwner(ComponentName) 或 setConfigurationActivity(ComponentName) 中的一個。 若兩者皆設,setConfigurationActivity(ComponentName) 會取代此規則,且使用者無法用來判斷該規則是否應啟用。 系統會驗證提供者 ComponentName 在呼叫 NotificationManager.addAutomaticZenRule(AutomaticZenRule)或 NotificationManager.updateAutomaticZenRule(String,AutomaticZenRule) 時,指向有效且已啟用的 ConditionProviderService。
Android 參考資料。android.app.AutomaticZenRule.Builder.setOwner
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。