如何识别蓝牙设备类型?

发布于 8 年前作者 panyan14906 次浏览最后编辑 8 年前来自 issues

连接蓝牙前,如何识别搜索到的蓝牙信号是来自电脑还是手机等其他设备。翻阅文档没有思路,百度无果。请教各位大佬。

1 回复
yina
yina1 楼6 年前

wx.onBluetoothDeviceFound(function callback)

返回值有 localName 试试用这个字段区分

https://developers.weixin.qq.com/miniprogram/dev/api/device/bluetooth/wx.onBluetoothDeviceFound.html