蓝牙打印startBluetoothDevicesDiscovery的BUG?
调用蓝牙4.0打印机,打印小票,startBluetoothDevicesDiscovery设置了allowDuplicatesKey为false,但依然会上报重复设备。是我调用错了?还是API有BUG?
微信版本6.5.14.32
IOS10.3.3
wx.startBluetoothDevicesDiscovery({ allowDuplicatesKey: false , success: function (res) { if (!res.isDiscovering) { wx.showToast({ title: '错误' , }) } }, fail: function () { wx.showToast({ title: '手机无法搜索蓝牙打印机' , }) } }) |
wx.onBluetoothDeviceFound( function (data) { var _d = data.devices[0]; if (deviceId == _d.deviceId) { //此处会执行多次 } }) |