【发布时间】:2014-09-29 12:15:49
【问题描述】:
我正在开发一个实现蓝牙的安卓应用。 蓝牙扫描,一切运行良好(我在这里参考了 android 蓝牙聊天代码示例:(https://android.googlesource.com/platform/development/+/25b6aed7b2e01ce7bdc0dfa1a79eaf009ad178fe/samples/BluetoothChat),但是当蓝牙扫描运行时,我的设备也会找到低功耗蓝牙设备。 我已经用 Galaxy Nexus (Android KitKat) 和 Nexus 7 (2013) (也是 KitKat) 进行了尝试。
如何防止蓝牙适配器在使用该功能时发现蓝牙 LE 设备
mBluetoothAdapter.startDiscovery();
官方的低功耗蓝牙示例 (http://developer.android.com/samples/BluetoothLeGatt/index.html) 说,对于低功耗扫描,您必须使用
mBluetoothAdapter.startLEScan();
作为一种解决方法,是否可以将发现的蓝牙经典设备与发现的蓝牙低功耗设备区分开来?
【问题讨论】:
标签: android bluetooth bluetooth-lowenergy android-4.4-kitkat connectivity