AppFunctionManager.SetAppFunctionEnabled 方法

定义

设置调用包拥有的应用函数的启用状态。

[Android.Runtime.Register("setAppFunctionEnabled", "(Ljava/lang/String;ILjava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=36)]
public void SetAppFunctionEnabled(string functionIdentifier, Android.App.AppFunctions.AppFunctionState newEnabledState, Java.Util.Concurrent.IExecutor executor, Android.OS.IOutcomeReceiver callback);
[<Android.Runtime.Register("setAppFunctionEnabled", "(Ljava/lang/String;ILjava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=36)>]
member this.SetAppFunctionEnabled : string * Android.App.AppFunctions.AppFunctionState * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit

参数

functionIdentifier
String

要启用的应用函数的标识符(在调用包中是唯一的)。 在大多数情况下,标识符由 AppFunctions SDK 自动生成

newEnabledState
AppFunctionState

应用函数的新状态

executor
IExecutor

要运行回调的执行程序

callback
IOutcomeReceiver

用于接收函数启用结果的回调。 如果未引发异常,则调用成功。

属性

注解

设置调用包拥有的应用函数的启用状态。

如果操作失败,将调用回调 OutcomeReceiver#onError 并显示错误:

<如果找不到函数,或者调用方无权访问它,则为 ul><li>IllegalArgumentException。 </ul>

Java文档android.app.appfunctions.AppFunctionManager.setAppFunctionEnabled(java.lang.String, int, java.util.concurrent.Executor, android.os.OutcomeReceiver<java.lang.Void, java.lang.Exception>)

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于