OK, just connect(true) is not sufficient #249

(we again get connection problems. Let's try this.)
here
cpfeiffer 2016-04-07 20:52:26 +02:00
parent a49335fa67
commit 1e5dbb6a23
1 changed files with 3 additions and 2 deletions

View File

@ -157,11 +157,12 @@ public final class BtLEQueue {
LOG.info("Attempting to connect to " + mGbDevice.getName());
mBluetoothAdapter.cancelDiscovery();
BluetoothDevice remoteDevice = mBluetoothAdapter.getRemoteDevice(mGbDevice.getAddress());
boolean result;
synchronized (mGattMonitor) {
mBluetoothGatt = remoteDevice.connectGatt(mContext, true, internalGattCallback);
// result = mBluetoothGatt.connect();
result = mBluetoothGatt.connect();
}
boolean result = mBluetoothGatt != null;
// boolean result = mBluetoothGatt != null;
if (result) {
setDeviceConnectionState(State.CONNECTING);
}