Health Connect enforces hard min/max bounds on each record-type field; a single out-of-range value caused the record constructor to throw and killed the entire batch insert. The trigger was a Garmin Venu 3 producing HRV > 200 ms, but several syncers shared the same gap (no upper bound, only > 0 or no validation at all). Add explicit per-syncer numeric guards matching the bounds enforced by HC's record constructors, drop out-of-range samples, log them with the existing [HC_SYNC] prefix, and continue the sync. Bounds applied (per-record HC enforcement): - HRV: 1..200 ms - VO2Max: 0..100 ml/kg/min - Weight: 0..1000 kg - BloodGlucose: 0..900.91 mg/dL (= 50 mmol/L) -- previously unvalidated - RespiratoryRate: 0..1000 breaths/min - HeartRate / RestingHR: 1..300 / 0..300 bpm (widened from 20..250 to match HC's contract; downstream consumers can apply physiological filters) - SpO2: 0..100 % - Steps: 1..1000000 per record - ActiveCalories: 0..1000000 kcal per record - Distance: 0..1000000 m per record - Skin temperature delta: -30..30 °C - Body temperature: existing physiological clamp 25..45 °C kept (HC has no enforced bound) Add Logger.skipOutOfRange extension in syncers/SyncerLogging.kt and relax HC_SYNC_TAG visibility from private to internal so syncers can share it. HeartRateSync aggregates dropped-sample counts into one summary log line per slice rather than per-sample, to avoid log spam from glitchy firmware. convertSample visibility relaxed from protected to internal in the two abstract base syncers so the new boundary tests can call it directly. 30 new unit tests in SyncerRangeValidationTest cover boundary conditions per syncer.
Gadgetbridge is hosted on codeberg.org.
Gadgetbridge
Gadgetbridge is an Android application which will allow you to use your Bluetooth gadgets (mostly wearables like smart watches, but many more) without the vendor's closed source application and without the need to create an account and transmit any of your data to the vendor's servers.
Download
- Nightly releases
- Nightly releases are updated more frequently and may be less stable than standard releases, and they are distributed by our F-Droid repository unlike standard releases.
- List of changes
Supported Devices
Please see the Gadgets page on the website for a complete list of supported devices.
Features
Please see the Features page on the website.
Authors
Core Team (in order of first code contribution)
- Andreas Shimokawa
- Carsten Pfeiffer
- Daniele Gobbetti
- Petr Vaněk
Additional contributors
- João Paulo Barraca (HPlus)
- Vitaly Svyastyn (NO.1 F1)
- Sami Alaoui (Teclast H30)
- "ladbsoft" (XWatch)
- Sebastian Kranz (ZeTime)
- Vadim Kaushan (ID115)
- "maxirnilian" (Lenovo Watch 9)
- "ksiwczynski", "mkusnierz", "mamutcho" (Lenovo Watch X Plus)
- Andreas Böhler (Casio)
- Jean-François Greffier (Mi Scale 2)
- Johannes Schmitt (BFH-16)
- Lukas Schwichtenberg (Makibes HR3)
- Daniel Dakhno (Fossil Q Hybrid, Fossil Hybrid HR)
- Gordon Williams (Bangle.js)
- Pavel Elagin (JYou Y5)
- Taavi Eomäe (iTag)
- Erik Bloß (TLW64)
- Yukai Li (Lefun)
- José Rebelo (Roidmi, Sony Headphones, Miband 7)
- Arjan Schrijver (Fossil Hybrid HR watchfaces)
Contribute
Contributions are welcome, be it feedback, bug reports, documentation, translation, research or code. Feel free to work on any of the open issues; just leave a comment that you're working on one to avoid duplicated work.
Developer documentation - Support for a new Device - New Device Tutorial
Translations can be contributed via https://hosted.weblate.org/projects/freeyourgadget/gadgetbridge/
Community
If you would like to get in touch with other Gadgetbridge users and developers outside of Codeberg, you can do so via:
- Matrix:
#gadgetbridge:matrix.org
Do you have further questions or feedback?
Feel free to open an issue on our issue tracker, but please:
- do not use the issue tracker as a forum, do not ask for ETAs and read the issue conversation before posting
- use the search functionality to ensure that your question wasn't already answered. Don't forget to check the closed issues as well!
- remember that this is a community project, people are contributing in their free time because they like doing so: don't take the fun away! Be kind and constructive.
- Do not ask for help regarding your own projects, unless they are Gadgetbridge related
Having problems?
- Phone crashing during device discovery? Disable Privacy Guard (or similarly named functionality) during discovery.
- Open Gadgetbridge's settings and check the option to write log files
- Reproduce the problem you encountered
- Check the logfile at /sdcard/Android/data/nodomain.freeyourgadget.gadgetbridge/files/gadgetbridge.log
- File an issue at https://codeberg.org/Freeyourgadget/Gadgetbridge/issues/new/choose and possibly provide the logfile
Alternatively you may use the standard logcat functionality to access the log.
Code Licenses
- Gadgetbridge is licensed under the AGPLv3
- Files in app/src/main/java/net/osmand/ and app/src/main/aidl/net/osmand/ are taken from the OsmAnd project, licensed under the GPLv3 by OsmAnd BV
- Files in app/src/main/java/org/bouncycastle are taken from the Bouncy Castle project, licensed under the MIT license by The Legion of the Bouncy Castle Inc.
- Files in app/src/main/java/com/android/nQuant are taken from the nQuant.android project, licensed under the Apache license by Miller Cy Chan
- Files in app/src/main/java/org/concentus are taken from the Concentus project, licensed under the BSD-3 license by various holding parties
- Files in GBDaoGenerator/src/de/greenrobot are taken from the greenDAO project (Gadgetbridge's fork), licensed under the GPLv3 by Markus Junginger, greenrobot
- File app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/SearchPreferenceHighlighter.java is taken from SearchPreference, licensed under the MIT license by ByteHamster