BLE sensors: faster connection.

This commit is contained in:
Dennis Guse
2022-05-29 22:50:47 +02:00
parent 05b572253e
commit 8a3e50ef9b
@@ -136,9 +136,9 @@ public abstract class BluetoothConnectionManager<DataType> {
Log.d(TAG, "Connecting to: " + device);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
bluetoothGatt = device.connectGatt(context, true, connectCallback, BluetoothDevice.TRANSPORT_AUTO, 0, this.observer.getHandler());
bluetoothGatt = device.connectGatt(context, false, connectCallback, BluetoothDevice.TRANSPORT_AUTO, 0, this.observer.getHandler());
} else {
bluetoothGatt = device.connectGatt(context, true, connectCallback);
bluetoothGatt = device.connectGatt(context, false, connectCallback);
}
SensorData<?> sensorData = createEmptySensorData(bluetoothGatt.getDevice().getAddress());
observer.onChanged(sensorData);