AppFunctionManager


class AppFunctionManager
kotlin.Any
   ↳ 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
static String

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

Public methods
Unit

Executes an app function provided by AppFunctionService through the system.

Constants

PERMISSION_BIND_APP_FUNCTION_SERVICE

static val PERMISSION_BIND_APP_FUNCTION_SERVICE: String

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

Protection level: signature.

Value: "android.permission.BIND_APP_FUNCTION_SERVICE"

Public methods

executeAppFunction

fun executeAppFunction(
    request: ExecuteAppFunctionRequest,
    executor: Executor,
    callback: Consumer<AppSearchResult<ExecuteAppFunctionResponse!>!>
): Unit

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<AppSearchResult<ExecuteAppFunctionResponse!>!>: A callback to receive the function execution result. This value cannot be null.