AppInteractionSession.CreateParams.Builder.SetOnStartIntentSenderCallback 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
当用户需要批准会话创建时调用。
[Android.Runtime.Register("setOnStartIntentSenderCallback", "(Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)Landroid/app/AppInteractionSession$CreateParams$Builder;", "", ApiSince=37)]
public Android.App.AppInteractionSession.CreateParams.Builder SetOnStartIntentSenderCallback(Java.Util.Concurrent.IExecutor executor, Java.Util.Functions.IConsumer callback);
[<Android.Runtime.Register("setOnStartIntentSenderCallback", "(Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)Landroid/app/AppInteractionSession$CreateParams$Builder;", "", ApiSince=37)>]
member this.SetOnStartIntentSenderCallback : Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> Android.App.AppInteractionSession.CreateParams.Builder
参数
- executor
- IExecutor
要运行回调的执行程序。 此值不能为 null。 回调和侦听器事件通过此执行程序调度,提供一种控制使用哪个线程的简单方法。 若要通过应用程序的主线程调度事件,可以使用 Context.getMainExecutor()。 否则,请提供调度到相应线程的执行程序。
- callback
- IConsumer
需要用户批准会话请求时要调用的回调。 此值不能为 null。
返回
- 特性
注解
当用户需要批准会话创建时调用。
当 AppInteractionManager.createSession(CreateParams,Executor,ResultReceiver)需要用户确认时,将调用此回调。
应用程序应为用户启动 UI,以允许通过调用 Context.startIntentSender(IntentSender、Intent、int、int、int)创建会话。
Android 参考。android.app.AppInteractionSession.CreateParams.Builder.setOnStartIntentSenderCallback
本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。