言語

AppFunctionManager.GetAppFunctionActivityStates Method

Definition

Retrieves the registered app functions for the specified activities.

[Android.Runtime.Register("getAppFunctionActivityStates", "(Ljava/util/Set;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=37)]
public void GetAppFunctionActivityStates(System.Collections.Generic.ICollection<Android.App.AppFunctions.AppFunctionActivityId> activityIds, Java.Util.Concurrent.IExecutor executor, Android.OS.IOutcomeReceiver callback);
[<Android.Runtime.Register("getAppFunctionActivityStates", "(Ljava/util/Set;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=37)>]
member this.GetAppFunctionActivityStates : System.Collections.Generic.ICollection<Android.App.AppFunctions.AppFunctionActivityId> * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit

Parameters

activityIds
ICollection<AppFunctionActivityId>

The set of activity IDs to retrieve function states 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 list of activity states. This value cannot be null.

Attributes

Remarks

Retrieves the registered app functions for the specified activities.

Each AppFunctionActivityState contains the set of registered AppFunctionNames associated with a requested AppFunctionActivityId.

Functions that do not exist or are not visible to the calling application will be silently omitted from the result. Requested activities that have no registered functions will be omitted from the result.

See AppFunctionActivityId for potential usages, including conversion from VoiceInteractionSession.ActivityId.

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

See getAppFunctionStates(List, Executor, OutcomeReceiver) for retrieving the runtime state of app functions based on their names.

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.getAppFunctionActivityStates.

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