AppFunctionManager.SetAppFunctionEnabled 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
設定呼叫套件所擁有的應用程式函式的啟用狀態。
[Android.Runtime.Register("setAppFunctionEnabled", "(Ljava/lang/String;ILjava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=36)]
public void SetAppFunctionEnabled(string functionIdentifier, Android.App.AppFunctions.AppFunctionEnabledState newEnabledState, Java.Util.Concurrent.IExecutor executor, Android.OS.IOutcomeReceiver callback);
[<Android.Runtime.Register("setAppFunctionEnabled", "(Ljava/lang/String;ILjava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=36)>]
member this.SetAppFunctionEnabled : string * Android.App.AppFunctions.AppFunctionEnabledState * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit
參數
- functionIdentifier
- String
應用程式函式的識別碼來啟用(在呼叫套件中唯一)。 在大多數情況下,識別碼會由 AppFunctions SDK 自動產生
- newEnabledState
- AppFunctionEnabledState
應用程式功能的新狀態
- executor
- IExecutor
執行者執行回調
- callback
- IOutcomeReceiver
回調以接收函式啟用的結果。 如果沒有例外,該決定即告成功。
- 屬性
備註
設定呼叫套件所擁有的應用程式函式的啟用狀態。
若操作失敗,回調 OutcomeReceiver#onError 會被呼叫並有錯誤:
<如果找不到該函式或呼叫者無法存取,則使用 ul><li>IllegalArgumentException。
</ul>
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。