Added in API level 37
AppFunction
public
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
void
|
onExecuteAppFunction(ExecuteAppFunctionRequest request, CancellationSignal cancellationSignal, OutcomeReceiver<ExecuteAppFunctionResponse, AppFunctionException> callback)
Called when the app function is invoked using |
Public methods
onExecuteAppFunction
Added in API level 37
public abstract void onExecuteAppFunction (ExecuteAppFunctionRequest request, CancellationSignal cancellationSignal, OutcomeReceiver<ExecuteAppFunctionResponse, AppFunctionException> callback)
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: 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. |