It's recommended to cancel discovery before connecting
This commit is contained in:
parent
952a383856
commit
c27459b6cc
|
@ -154,6 +154,7 @@ public final class BtLEQueue {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOG.info("Attempting to connect to " + mGbDevice.getName());
|
LOG.info("Attempting to connect to " + mGbDevice.getName());
|
||||||
|
mBluetoothAdapter.cancelDiscovery();
|
||||||
BluetoothDevice remoteDevice = mBluetoothAdapter.getRemoteDevice(mGbDevice.getAddress());
|
BluetoothDevice remoteDevice = mBluetoothAdapter.getRemoteDevice(mGbDevice.getAddress());
|
||||||
boolean result;
|
boolean result;
|
||||||
synchronized (mGattMonitor) {
|
synchronized (mGattMonitor) {
|
||||||
|
|
Loading…
Reference in New Issue