From d5c701b69fe5944fc69738fc0e332f9f2c2c6d4b Mon Sep 17 00:00:00 2001 From: Erik Johansson Date: Sun, 8 Apr 2018 00:11:48 +0200 Subject: [PATCH] Try to connect to BLE device directly instead of waiting for the device to become available. Should speed up connecting to the device. --- .../health/openscale/core/bluetooth/BluetoothCommunication.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android_app/app/src/main/java/com/health/openscale/core/bluetooth/BluetoothCommunication.java b/android_app/app/src/main/java/com/health/openscale/core/bluetooth/BluetoothCommunication.java index cd8f6887..846756e9 100644 --- a/android_app/app/src/main/java/com/health/openscale/core/bluetooth/BluetoothCommunication.java +++ b/android_app/app/src/main/java/com/health/openscale/core/bluetooth/BluetoothCommunication.java @@ -380,7 +380,7 @@ public abstract class BluetoothCommunication { if (device.getName().toLowerCase().equals(btDeviceName.toLowerCase())) { Log.d("BluetoothCommunication", btDeviceName + " found trying to connect..."); - bluetoothGatt = device.connectGatt(context, true, gattCallback); + bluetoothGatt = device.connectGatt(context, false, gattCallback); } } }