AppFunctionManager.ExecuteAppFunction Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Executes the app function.
[Android.Runtime.Register("executeAppFunction", "(Landroid/app/appfunctions/ExecuteAppFunctionRequest;Ljava/util/concurrent/Executor;Landroid/os/CancellationSignal;Landroid/os/OutcomeReceiver;)V", "", ApiSince=36)]
[Android.Runtime.RequiresPermission("android.permission.EXECUTE_APP_FUNCTIONS")]
public void ExecuteAppFunction(Android.App.AppFunctions.ExecuteAppFunctionRequest request, Java.Util.Concurrent.IExecutor executor, Android.OS.CancellationSignal cancellationSignal, Android.OS.IOutcomeReceiver callback);
[<Android.Runtime.Register("executeAppFunction", "(Landroid/app/appfunctions/ExecuteAppFunctionRequest;Ljava/util/concurrent/Executor;Landroid/os/CancellationSignal;Landroid/os/OutcomeReceiver;)V", "", ApiSince=36)>]
[<Android.Runtime.RequiresPermission("android.permission.EXECUTE_APP_FUNCTIONS")>]
member this.ExecuteAppFunction : Android.App.AppFunctions.ExecuteAppFunctionRequest * Java.Util.Concurrent.IExecutor * Android.OS.CancellationSignal * Android.OS.IOutcomeReceiver -> unit
Parameters
- request
- ExecuteAppFunctionRequest
the request to execute the app function
- executor
- IExecutor
the executor to run the callback
- cancellationSignal
- CancellationSignal
the cancellation signal to cancel the execution.
- callback
- IOutcomeReceiver
the callback to receive the function execution result or error.
<p>If the calling app does not own the app function or does not have android.permission.EXECUTE_APP_FUNCTIONS
, the execution result will contain AppFunctionException.ERROR_DENIED
.
<p>If the caller only has android.permission.EXECUTE_APP_FUNCTIONS
, the execution
result will contain AppFunctionException.ERROR_DENIED
<p>If the function requested for execution is disabled, then the execution result will
contain AppFunctionException.ERROR_DISABLED
<p>If the cancellation signal is issued, the operation is cancelled and no response is
returned to the caller.
- Attributes
Remarks
Executes the app function.
Note: Applications can execute functions they define. To execute functions defined in another component, apps would need to have the permission android.permission.EXECUTE_APP_FUNCTIONS
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.