有无大佬遇到过
NFC标签拉起小程序连接 wx.startBluetoothDevicesDiscovery不执行?通过NFC拉起小程序,自动根据提前存入到NFC标签mac地址去匹配附近蓝牙设备进行连接,安卓端经常会出现 wx.startBluetoothDevicesDiscovery 不执行?导致搜索不到附近设备进行连接!(安卓端有问题,ios无问题) 代码片段 // NFC进入连接方法 HomeNFCConnect (NFCmac) { wx.openBluetoothAdapter({ success: async (res) => { logger.info('HomeNFCConnect NFCmac: ', NFCmac) // 以下方法 有时执行,有时不执行 wx.startBluetoothDevicesDiscovery({ allowDuplicatesKey: wx.getStorageSync('platform') == 'ios' ? false : true, interval: 0, powerLevel: 'high', success: async (res) => { logger.info('HomeNFCConnect startBluetoothDevicesDiscovery NFCmac: ', NFCmac) await wx.onBluetoothDeviceFound(async ({ devices }) => { const { localName, name, advertisData, connectable, deviceId } = devices[0] }) }, fail: async (error) => { logger.info('HomeNFCConnect startBluetoothDevicesDiscovery error: ', error) this.initBlue() if (error.errno == 1509008) { // 需要开启位置才能搜索蓝牙 wx.showToast({ title: '请前往手机应用微信设置中开启位置权限', icon: 'error', duration: 1500 }) } } }) }, fail: (error) => { wx.showToast({ title: 'openBluetoothAdapter error ' + error, icon: 'error', duration: 3000 }) } }) }, 线上日志如下: [图片]
2024-10-28你的硬件申请审核多少天通过的呀?我这上一步7天了还没通过~
设备能力申->NFC 标签调起小程序,一直处于审核中。怎么加急通过?NFC 标签调起小程序 一直处于审核中 [图片]
2024-06-26火烧屁股了~ 有没有大佬遇到过,解答下呢?
wx.onBLECharacteristicValueChange 写在onLoad里安卓监听不到?写在页面onLoad里的,页面第一次监听到一次,后面蓝牙再发送数据后就没反应了,ios情况下是正常的,麻烦大佬帮忙看下原因,以下为贴图: [图片]
2024-04-17