diff --git a/README.md b/README.md index feb582a0a..35657706e 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Please see [FEATURES.md](https://github.com/Freeyourgadget/Gadgetbridge/blob/mas ## Getting Started (Pebble) -1. Pair your Pebble through the Android's Bluetooth Settings or Gadgetbridge. Pebble 2 MUST be paired though Gadgetbridge (tap on the + in Control Center) +1. Pair your Pebble through Gadgetbridge (tap on the + in Control Center) 2. Start Gadgetbridge, tap on the device you want to connect to 3. To test, choose "Debug" from the menu and play around diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/DeviceHelper.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/DeviceHelper.java index cc1fc17cc..2f483af39 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/DeviceHelper.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/DeviceHelper.java @@ -132,12 +132,7 @@ public class DeviceHelper { GB.toast(context, context.getString(R.string.bluetooth_is_disabled_), Toast.LENGTH_SHORT, GB.WARN); } List dbDevices = getDatabaseDevices(); - // these come first, as they have the most information already availableDevices.addAll(dbDevices); - if (btAdapter != null) { - List bondedDevices = getBondedDevices(btAdapter); - availableDevices.addAll(bondedDevices); - } Prefs prefs = GBApplication.getPrefs(); String miAddr = prefs.getString(MiBandConst.PREF_MIBAND_ADDRESS, ""); @@ -264,29 +259,6 @@ public class DeviceHelper { return gbDevice; } - private @NonNull List getBondedDevices(@NonNull BluetoothAdapter btAdapter) { - Set pairedDevices = btAdapter.getBondedDevices(); - if (pairedDevices == null) { - return Collections.emptyList(); - } - - List result = new ArrayList<>(pairedDevices.size()); - DeviceHelper deviceHelper = DeviceHelper.getInstance(); - for (BluetoothDevice pairedDevice : pairedDevices) { - if (pairedDevice == null) { - continue; // just to be safe, see https://github.com/Freeyourgadget/Gadgetbridge/pull/1052 - } - if (pairedDevice.getName() != null && (pairedDevice.getName().startsWith("Pebble-LE ") || pairedDevice.getName().startsWith("Pebble Time LE "))) { - continue; // ignore LE Pebble (this is part of the main device now (volatileAddress) - } - GBDevice device = deviceHelper.toSupportedDevice(pairedDevice); - if (device != null) { - result.add(device); - } - } - return result; - } - /** * Attempts to removing the bonding with the given device. Returns true * if bonding was supposedly successful and false if anything went wrong