NFCAdapter.offDiscovered
bilibili iOS 版:不支持
bilibili Android 版:支持
相关文档: 近场通信 (NFC)
功能描述
移除 NFC Tag的监听函数
参数
function listener
onDiscovered 传入的监听函数。不传此参数则移除所有监听函数。
示例代码
const listener = function (res) { console.log(res) }
NFCAdapter.onDiscovered(listener)
NFCAdapter.offDiscovered(listener) // 需传入与监听时同一个的函数对象