mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-02 17:43:06 +02:00
BLE sensors: faster connection.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user