1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-24 05:50:47 +02:00
Gadgetbridge/app/src/main/java/nodomain/freeyourgadget/gadgetbridge
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
..
activities Add BlueTooth receivers in onResume 2020-12-28 22:03:41 +01:00
adapter Improve Sports Activities dashboard and Filter 2020-11-26 17:19:08 +01:00
contentprovider Update license headers 2020-01-09 10:44:32 +01:00
database Fixed a bunch of misspellings and formatting 2020-08-26 14:37:40 +03:00
deviceevents Update license headers 2020-01-09 10:44:32 +01:00
devices Added Support for Amazfit Verge Lite 2020-12-20 22:39:51 +01:00
entities add missing AbstractGBX100ActivitySample 2020-12-20 18:21:20 +01:00
export Huami: do not write elevation to GPX if we have a base altitude of -20000 2020-09-03 23:01:59 +02:00
externalevents Update Do Not Disturb support to allow priority notifications to break through. 2020-12-28 22:02:05 +01:00
impl Also use device alias if set in notification 2020-06-12 22:49:16 +02:00
model Added Support for Amazfit Verge Lite 2020-12-20 22:39:51 +01:00
service Fossil Hybrid: avoid unnessecary widget rendering 2020-12-24 14:35:22 +01:00
util ensure that correct device is used for activity launched from widget 2020-12-21 11:23:01 +01:00
GBApplication.java Add GPS fragment to Sport Activity detail 2020-10-24 18:27:51 +02:00
GBEnvironment.java Update license headers 2020-01-09 10:44:32 +01:00
GBException.java Update license headers 2020-01-09 10:44:32 +01:00
LockHandler.java Update license headers 2020-01-09 10:44:32 +01:00
Logging.java Update license headers 2020-01-09 10:44:32 +01:00
LoggingExceptionHandler.java Update license headers 2020-01-09 10:44:32 +01:00
SleepAlarmWidget.java Control alarm snooze mode on MiBand2 2020-01-12 12:02:04 +03:00
Widget.java ensure that correct device is used for activity launched from widget 2020-12-21 11:23:01 +01:00