首页 文章

Android:从低能量扫描中分离蓝牙经典扫描,或将经典设备与低能耗设备区分开来

提问于
浏览
2

我正在开发一个实现蓝牙的Android应用程序 . 蓝牙扫描和一切运行正常(我在这里指的是android bletooth聊天代码示例:( https://android.googlesource.com/platform/development/+/25b6aed7b2e01ce7bdc0dfa1a79eaf009ad178fe/samples/BluetoothChat),但是当蓝牙扫描运行时,我的设备也找到蓝牙低功耗设备 . 我用Galaxy Nexus(Android KitKat)尝试过它)和Nexus 7(2013)(也是KitKat) .

使用此功能时,如何防止BluetoothAdapter发现蓝牙LE设备

mBluetoothAdapter.startDiscovery();

官方蓝牙低能耗示例(http://developer.android.com/samples/BluetoothLeGatt/index.html)表示,对于低能量扫描,您必须使用

mBluetoothAdapter.startLEScan();

作为一种解决方法,可以将发现的蓝牙经典设备与发现的蓝牙低功耗设备区分开来吗?

1 回答

相关问题