简单一行初始化蓝牙模块代码
wx.openBluetoothAdapter({
success: function (res) {
wx.showToast({
title: '获取成功',
})
},
fail: function (res) {
console.log(res)
wx.showToast({
title: '获取失败',
})
}
})
提示报错
errMsg: "openBluetoothAdapter:fail TypeError: Cannot read property 'addListener' of undefined"}