1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-26 20:06:52 +01:00
Gadgetbridge/app/src/main/java
Toby Murray ab306b1352 Add BlueTooth receivers in onResume
Pairing some devices requires a PIN to be entered. E.g. the flow is: confirm you'd like to pair, pass off to Android which prompts for a PIN to pair with (typically shows up on the non-phone device's screen or is hard coded in the manual), then return back to the app.

When this pairing request screen pops up, it takes focus. This invokes onPause and onStop in the DiscoveryActivity, which removes the BlueTooth broadcast receivers. Returning focus (after successful pairing), there's nothing to listen to the event. Practically speaking, GadgetBridge last saw the device as BOND_BONDING, so it's out of sync. If queried, the device is BOND_BONDED, so it's good to move on to the next step.

Many existing pairing activities (Lenovo, MiBand, Pebble, Watch9) have an implementation of onResume() to presumably tackle this issue, this adds it to `DiscoveryActivity` as well. Testing with some other supporting code, this allows a Garmin vivosport to appear in Gadgetbridge.
2020-12-28 22:03:41 +01:00
..
com/mobeta/android/dslv Experiment with a draggable sort list. 2020-11-07 22:48:34 +01:00
lineageos add stripped down version of weather part of lineage sdk 2019-08-22 21:19:03 +02:00
nodomain/freeyourgadget/gadgetbridge Add BlueTooth receivers in onResume 2020-12-28 22:03:41 +01:00
ru/gelin/android/weather/notification Fix timestamps for weather notification, this did not result in any known bug though 2020-06-29 17:54:38 +02:00