AppFunctionManager


public final class AppFunctionManager
extends Object

java.lang.Object
   ↳ android.app.appsearch.functions.AppFunctionManager


Provides app functions related functionalities.

App function is a specific piece of functionality that an app offers to the system. These functionalities can be integrated into various system features.

You can obtain an instance using AppSearchManager.getAppFunctionManager().

Summary

Constants

String PERMISSION_BIND_APP_FUNCTION_SERVICE

Must be required by a AppFunctionService, to ensure that only the system can bind to it.

Public methods

void executeAppFunction(ExecuteAppFunctionRequest request, Executor executor, Consumer<AppSearchResult<ExecuteAppFunctionResponse>> callback)

Executes an app function provided by AppFunctionService through the system.

Inherited methods

Constants

PERMISSION_BIND_APP_FUNCTION_SERVICE

public static final String PERMISSION_BIND_APP_FUNCTION_SERVICE

Must be required by a AppFunctionService, to ensure that only the system can bind to it.

Protection level: signature.

Constant Value: "android.permission.BIND_APP_FUNCTION_SERVICE"

Public methods

executeAppFunction

public void executeAppFunction (ExecuteAppFunctionRequest request, 
                Executor executor, 
                Consumer<AppSearchResult<ExecuteAppFunctionResponse>> callback)

Executes an app function provided by AppFunctionService through the system.

Parameters
request ExecuteAppFunctionRequest: The request. This value cannot be null.

executor Executor: Executor on which to invoke 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 Consumer: A callback to receive the function execution result. This value cannot be null.