判断蓝牙是否连接成功并获取设备名称?
wx.openBluetoothAdapter({ //蓝牙是否开启
success(res) {
wx.getBluetoothAdapterState({ //蓝牙是否连接成功
success (res) {
console.log(res)
}
})
console.log(res.errMsg)
}
})
w无论是否连接成功都是