AppFunctionManager.GetAppFunctionStates 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得指定應用程式函式的執行時狀態。
[Android.Runtime.Register("getAppFunctionStates", "(Ljava/util/List;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=37)]
public void GetAppFunctionStates(System.Collections.Generic.IList<Android.App.AppFunctions.AppFunctionName> appFunctionNames, Java.Util.Concurrent.IExecutor executor, Android.OS.IOutcomeReceiver callback);
[<Android.Runtime.Register("getAppFunctionStates", "(Ljava/util/List;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=37)>]
member this.GetAppFunctionStates : System.Collections.Generic.IList<Android.App.AppFunctions.AppFunctionName> * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit
參數
- appFunctionNames
- IList<AppFunctionName>
應用程式名稱可以請求州的資訊。 這個值不可能為零值。
- executor
- IExecutor
執行者負責執行回調。 這個值不可能為零值。 回調與監聽事件透過此執行器派遣,提供簡便控制使用執行緒的方式。 要透過應用程式的主執行緒派發事件,可以使用 Context.getMainExecutor()。 否則,提供一個執行者,將執行者派遣到適當的執行緒。
- callback
- IOutcomeReceiver
回調以接收函式狀態結果。 這個值不可能為零值。
- 屬性
備註
取得指定應用程式函式的執行時狀態。
這包括改變執行時的屬性,例如函式目前是否啟用或停用。 不存在或呼叫應用程式看不到的函式會被默默地從結果列表中省略。
此方法遵循與 searchAppFunctions(AppFunctionSearchSpec、Executor、OutcomeReceiver)相同的權限規則。
請參閱 getAppFunctionActivityStates(Set, Executor, OutcomeReceiver) 以取得與特定活動相關的應用程式函式狀態。
請參閱 searchAppFunctions(AppFunctionSearchSpec, Executor, OutcomeReceiver) 了解如何取得應用程式函式的 AppFunction 元資料。
請參閱觀察應用函數 AppFunction(Executor, AppFunctionObserver)以觀察 AppFunction Metadata 與 AppFunctionStates 的變更。
Android 參考資料。android.app.appfunctions.AppFunctionManager.getAppFunctionStates
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。