From 1150bdbfed1973bbf9e7bf7a3cd093221aa67544 Mon Sep 17 00:00:00 2001 From: Erik Johansson Date: Sun, 8 Apr 2018 13:17:28 +0200 Subject: [PATCH] Revert "Try to connect to BLE device directly" Will have to rethink this. Perhaps try to connect to device directly first, and if that fails fall back to autoconnect. This reverts commit d5c701b69fe5944fc69738fc0e332f9f2c2c6d4b. --- .../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 846756e9..cd8f6887 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, false, gattCallback); + bluetoothGatt = device.connectGatt(context, true, gattCallback); } } }