CardEmulation.RegisterNfcEventCallback 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
注册 NFC 事件的回调。
[Android.Runtime.Register("registerNfcEventCallback", "(Ljava/util/concurrent/Executor;Landroid/nfc/cardemulation/CardEmulation$NfcEventCallback;)V", "", ApiSince=36)]
public void RegisterNfcEventCallback(Java.Util.Concurrent.IExecutor executor, Android.Nfc.CardEmulators.CardEmulation.INfcEventCallback callback);
[<Android.Runtime.Register("registerNfcEventCallback", "(Ljava/util/concurrent/Executor;Landroid/nfc/cardemulation/CardEmulation$NfcEventCallback;)V", "", ApiSince=36)>]
member this.RegisterNfcEventCallback : Java.Util.Concurrent.IExecutor * Android.Nfc.CardEmulators.CardEmulation.INfcEventCallback -> unit
参数
- executor
- IExecutor
要运行回调的执行程序。 此值不能为 null。 回调和侦听器事件通过此执行程序调度,提供一种控制使用哪个线程的简单方法。 若要通过应用程序的主线程调度事件,可以使用 Context.getMainExecutor()。 否则,请提供调度到相应线程的执行程序。
- callback
- CardEmulation.INfcEventCallback
要注册的回调。 此值不能为 null。
- 特性
注解
注册 NFC 事件的回调。
Android 参考。android.nfc.cardemulation.CardEmulation.registerNfcEventCallback
本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。