ExecuteAppFunctionResponse.Success


public final class ExecuteAppFunctionResponse.Success implements ExecuteAppFunctionResponse

Represents a successful execution of an app function.

Summary

Public constructors

Constants

PROPERTY_RETURN_VALUE

public static final @NonNull StringPROPERTY_RETURN_VALUE

The key name of the property that stores the function return value within result.

See AppFunctionData documentation on retrieving expected fields.

Public constructors

Success

Added in 1.0.0-alpha08
public Success(@NonNull AppFunctionData returnValue)

Public methods

getReturnValue

Added in 1.0.0-alpha08
public final @NonNull AppFunctionDatagetReturnValue()

The return value of the executed function. An AppFunctionData.EMPTY indicates that the function does not produce a return value.

toCompatExecuteAppFunctionResponse

Added in 1.0.0-alpha08
@RequiresApi(value = 36)
public static final @NonNull ExecuteAppFunctionResponse.SuccesstoCompatExecuteAppFunctionResponse(
 @NonNull ExecuteAppFunctionResponse receiver,
 @NonNull AppFunctionMetadata functionMetadata
)

Creates ExecuteAppFunctionResponse from android.app.appfunctions.ExecuteAppFunctionResponse.

The resulting response object is validated against the provided AppFunctionMetadata.

Parameters
@NonNull AppFunctionMetadata functionMetadata

the AppFunctionMetadata of the function that was executed.