Added in API level 37

AppFunction


interface AppFunction
android.app.appfunctions.AppFunction

An interface for implementing the logic of an app function registered at runtime using AppFunctionManager.registerAppFunction.

Summary

Public methods
abstract Unit

Called when the app function is invoked using AppFunctionManager.executeAppFunction.

Public methods

onExecuteAppFunction

Added in API level 37
abstract fun onExecuteAppFunction(
    request: ExecuteAppFunctionRequest,
    cancellationSignal: CancellationSignal,
    callback: OutcomeReceiver<ExecuteAppFunctionResponse!, AppFunctionException!>
): Unit

Called when the app function is invoked using AppFunctionManager.executeAppFunction.

The implementation should try to respect the provided CancellationSignal, if possible.

Parameters
request ExecuteAppFunctionRequest: The ExecuteAppFunctionRequest containing the parameters for this execution.
This value cannot be null.
cancellationSignal CancellationSignal: A signal to cancel the execution.
This value cannot be null.
callback OutcomeReceiver<ExecuteAppFunctionResponse!, AppFunctionException!>: The OutcomeReceiver that the implementation must use to return the result of the execution. It must be called exactly once with either a successful ExecuteAppFunctionResponse or an AppFunctionException in case of an error.
This value cannot be null.