2,526
社区成员
发帖
与我相关
我的任务
分享
private void ScanBlueTooth()
{
showMsg("正在搜索蓝牙设备...");
//下面这个方法一直貌似就没有执行,怎么也发现不了其他设备
BluetoothLEHardwareInterface.ScanForPeripheralsWithServices(null, (address, name) =>
{
//扫描处理,加入设备列表
showMsg(string.Format("1已经搜索到设备!名称:{0},地址:{1}", name, address));
}, (address, name, rssi, advertisingInfo) =>
{
//扫描处理,加入设备列表
showMsg(string.Format("2已经搜索到设备!名称:{0},地址:{1}", name, address));
});
}