0
我想在Android中一次连接多个ble设备。我可以一次连接到单个设备,并可以在它们之间传递数据。为了实现单一连接,我使用了以下链接https://github.com/googlesamples/android-BluetoothLeGatt中的代码。我怎样才能一次建立多个连接?有这样的示例代码吗?如何在Android中同时连接到多个BLE设备?
我想在Android中一次连接多个ble设备。我可以一次连接到单个设备,并可以在它们之间传递数据。为了实现单一连接,我使用了以下链接https://github.com/googlesamples/android-BluetoothLeGatt中的代码。我怎样才能一次建立多个连接?有这样的示例代码吗?如何在Android中同时连接到多个BLE设备?
API中没有任何内容阻止您同时连接到多个设备。只需对每个设备执行https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#connectGatt(android.content.Context, boolean, android.bluetooth.BluetoothGattCallback)(直到达到内部限制)。