Langue

AppFunctionManager.GetAppFunctionStates Method

Definition

Retrieves the runtime state of the specified app functions.

[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

Parameters

appFunctionNames
IList<AppFunctionName>

The names of the app functions to request the state for. This value cannot be null.

executor
IExecutor

The executor to run the callback. This value cannot be null. Callback and listener events are dispatched through this Executor, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use Context.getMainExecutor(). Otherwise, provide an Executor that dispatches to an appropriate thread.

callback
IOutcomeReceiver

The callback to receive the function state result. This value cannot be null.

Attributes

Remarks

Retrieves the runtime state of the specified app functions.

This includes runtime-changing properties such as whether the functions are currently enabled or disabled. Functions that do not exist or are not visible to the calling application will be silently omitted from the result list.

This method follows the same permission rules as searchAppFunctions(AppFunctionSearchSpec, Executor, OutcomeReceiver).

See getAppFunctionActivityStates(Set, Executor, OutcomeReceiver) for retrieving the states of app functions associated with a specific activity.

See searchAppFunctions(AppFunctionSearchSpec, Executor, OutcomeReceiver) on how to retrieve the AppFunctionMetadata of app functions.

See observeAppFunctions(Executor, AppFunctionObserver) for observing changes to app functions' AppFunctionMetadata and AppFunctionStates.

Android reference for android.app.appfunctions.AppFunctionManager.getAppFunctionStates.

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