Commit Graph
16352 Commits
Author SHA1 Message Date
Thomas Kuehne b1ba12923c Wena3: switch to automatically generated sample providers 2026-05-29 20:32:58 +00:00
Thomas Kuehne 2a9966e203 Ultrahuman: switch to automatically generated sample providers 2026-05-29 20:32:55 +00:00
Thomas Kuehne 577a1fe918 QHybrid: switch to automatically generated sample provider 2026-05-29 20:32:50 +00:00
Thomas Kuehne ae125f1763 Moyoung: switch to automatically generated sample providers 2026-05-29 20:32:48 +00:00
Thomas Kuehne 481477e5a8 MiScale: switch to automatically generated sample provider 2026-05-29 20:32:46 +00:00
Thomas Kuehne 08732d3013 Mijia Lywsd: switch to automatically generated sample provider 2026-05-29 20:32:44 +00:00
Thomas Kuehne 6f51e3a764 Huawei: switch to automatically generated sample providers 2026-05-29 20:32:42 +00:00
Thomas Kuehne 3bab9b8620 Huami: switch to automatically generated sample providers 2026-05-29 20:32:40 +00:00
Thomas Kuehne 129ecb0c8c Glory Fit: switch to automatically generated sample provider 2026-05-29 20:32:37 +00:00
Thomas Kuehne caad9b0af4 Garmin: switch to automatically generated sample providers 2026-05-29 20:32:35 +00:00
Thomas Kuehne 43c92e0317 Cycling Sensor: switch to automatically generated sample provider 2026-05-29 20:32:33 +00:00
Thomas Kuehne 54fa5f3b01 CMF Watch Pro: switch to automatically generated sample providers 2026-05-29 20:32:30 +00:00
Thomas Kuehne 55d3511105 Blood Pressure: switch to automatically generated sample provider 2026-05-29 20:32:24 +00:00
José Rebelo cc66210457 Fix build after Keep Health rebase 2026-05-29 21:13:58 +01:00
José Rebelo aab44cc60c Merge pull request 'Garmin: Replace SLF4J 2.0 fluent API call with 1.x-compatible logging' (#6209)
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/6209
2026-05-29 22:00:46 +02:00
LiJu09andJosé Rebelo 637ca0069c add support for keephealth devices (#5634)
Add support for devices using Keephealth app [https://play.google.com/store/apps/details?id=com.keephealthpro.android&hl=en-US](https://play.google.com/store/apps/details?id=com.keephealthpro.android&hl=en-US)
Currently tested with this "LIGE" smartband [https://www.aliexpress.com/item/1005005057986140.html](https://www.aliexpress.com/item/1005005057986140.html)

Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/5634
2026-05-29 21:49:26 +02:00
Thomas Kuehne 97281bcb38 MetricsSamples: add experimental UI visualisation paths
- (de-)activate via Settings / Developer Options / Experimental metrics UI
- UI currently uses this only for TrainingAcuteLoad, TrainingChronicLoad and RestingMetabolicRate
- Garmin devices are the only ones that actually record these values in the database
2026-05-29 19:28:32 +00:00
Thomas Kuehne 23cf885c13 MetricsSamples: database infrastructure
- fix: use milliseconds instead of seconds to align with most other samples
- DB upgrade copies existing data from GARMIN_RESTING_METABOLIC_RATE_SAMPLE, GENERIC_TRAINING_LOAD_ACUTE_SAMPLE and GENERIC_TRAINING_LOAD_CHRONIC_SAMPLE to GENERIC_METRIC_SAMPLE
- new data is saved to both the specific table as well as GENERIC_METRIC_SAMPLE
- add GenericMetricSampleProvider with service functions
- add GENERIC_MAXIMUM_OXYGEN_UPTAKE parsing for Garmin
2026-05-29 19:28:26 +00:00
José Rebelo 9154fe7f7f Merge pull request 'introduce PersistanceProvider interface' (#6205)
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/6205
2026-05-29 21:15:40 +02:00
Gideon Zenz 67c71ef325 Garmin: Replace SLF4J 2.0 fluent API call with 1.x-compatible logging
LOG.atLevel(logLevel).log(...) in NativeFITMessage.getFieldDefinition
uses the SLF4J 2.0 fluent API, which logback-android 3.0.0 does not
implement. This throws AbstractMethodError at runtime, crashing the
FitAsyncProcessor thread and aborting the entire Garmin device sync
when a .FIT file triggers the type/size mismatch path.

Replace with a switch dispatching to LOG.debug/info/warn.
2026-05-29 21:07:16 +02:00
José Rebelo 650ffc0fed Fix DBHelper.getDevice calls
device is never mutated
2026-05-29 19:18:34 +01:00
José Rebelo b96ee55982 Fix export of database BLOB columns 2026-05-29 19:12:11 +01:00
José Rebelo 88aaf8d34a Merge pull request 'DBHelper: improve JavaDoc' (#6204)
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/6204
2026-05-29 19:57:16 +02:00
Thomas Kuehne 3e9c10c0d7 persistence: replace calls to persistForDevice with persistSamples 2026-05-29 01:31:10 +00:00
Thomas Kuehne 1569e05acb Garmin: use harmonised persistSamples methods 2026-05-29 01:31:05 +00:00
Thomas Kuehne 57e493fa86 persistence: add SampleProvider support 2026-05-29 01:30:58 +00:00
Thomas Kuehne e7b86faf7a persistence: add AbstractTimeSample support 2026-05-29 01:20:59 +00:00
Thomas Kuehne 79b5abe85e persistence: add BatteryLevel support 2026-05-29 01:20:37 +00:00
Thomas Kuehne eac3c94a0b persistence: add BaseActivitySummary support 2026-05-29 01:20:14 +00:00
Thomas Kuehne 422047de19 DBHelper: improve JavaDoc 2026-05-29 01:18:34 +00:00
Thomas Kuehne 38e43a32b6 GB.toast: improve JavaDoc 2026-05-28 23:26:38 +00:00
Gideon Zenz 6c70aa371d Health Connect: Drop out-of-range sample values to prevent sync abort
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.
2026-05-27 11:44:35 +02:00
Gideon Zenz 7832f8a4a8 Health Connect: Sanitise GPS route to prevent ExerciseRoute crash
ExerciseRoute requires strictly increasing timestamps; duplicate-second
points from device GPS parsers (e.g. Xiaomi Smart Band 9 Pro outdoor
cycling) caused IllegalArgumentException at construction time, aborting
the workout sync entirely.

Extract route construction into buildSanitisedRoute, which:
- drops points outside the workout time window
- drops points with non-finite or out-of-range lat/lng (HC's Location
  constructor enforces lat in [-90, 90], lng in [-180, 180])
- drops points with non-finite or negative hdop/vdop accuracy (HC
  rejects negative accuracy)
- deduplicates points by Instant
- returns null if fewer than two usable points remain
- catches IllegalArgumentException as a safety net so future HC
  invariants degrade gracefully (workout saves without route rather
  than the whole sync aborting)

Logs dropped points with the [HC_SYNC] prefix so users can grep.
2026-05-27 10:20:07 +02:00
José Rebelo 35d926ce4e Merge pull request 'add missing @Override annotations' (#6187)
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/6187
2026-05-26 01:11:48 +02:00
José Rebelo d9a3495d09 Merge pull request 'annotations: prefer androidx.annotation over org.jetbrains.annotations' (#6184)
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/6184
2026-05-26 01:10:24 +02:00
Thomas Kuehne 2f2bb33ddf add missing @Override annotations 2026-05-25 17:24:58 +00:00
Thomas Kuehne dd2b864461 DeviceCoordinator: explicitly specify @Nullable for some returns 2026-05-25 16:01:16 +00:00
Thomas Kuehne 04c7f9e9e6 DeviceCoordinator: explicitly specify @NonNull for arguments 2026-05-25 16:00:49 +00:00
Thomas Kuehne f58130ba8d annotations: prefer androidx.annotation over org.jetbrains.annotations
The Androidx annotations are frequently used whereas Jetbrains annotations are infrequently used.
Where possible, use Androidx instead of Jetbrains annotations.
2026-05-24 18:17:04 +00:00
Thomas Kuehne 5cb0e6b70d Garmin: add more ANT+ gadget IDs 2026-05-24 13:31:49 +00:00
Dominik Riebeling d659225e7b CMF Buds 2 Plus: Enable touch configuration
- Enable touch options
- Add missing Play/Pause option to list
2026-05-24 09:32:36 +02:00
Dominik Riebeling 8acad7a853 CMF Buds: Enable spatial audio for more models
- Buds 2

Supported according to the product specs page.
2026-05-24 09:32:36 +02:00
Dominik Riebeling f32111a8b4 CMF Buds: Update EQ presets
Add preset list for

- Buds 2
- Buds 2 Pro

Lists taken from Nothing support pages.
2026-05-24 09:32:36 +02:00
Dominik Riebeling f66dc7d724 CMF Buds: Enable Low Latency on more devices
- ear(a): according to #3994
2026-05-24 09:32:36 +02:00
Dominik Riebeling f02937c321 CMF Buds: Enable Ultra Bass for more devices
Ultra Bass is supported by

- Buds Pro 2: according to #3924
- Buds 2: according to #5579

Needs verification.
2026-05-24 09:32:36 +02:00
Dominik Riebeling 9b00c3edaa CMF Buds 2 Plus: Add spatial mode
- Add support for spatial mode
- Enable for Buds 2 Plus
2026-05-24 09:32:36 +02:00
dependency-botandJosé Rebelo eaebdc8278 Update dependency org.json:json to v20260522 2026-05-23 23:50:41 +02:00
José Rebelo db550db8f1 Update changelog 2026-05-23 21:34:51 +01:00
wighawagandJosé Rebelo a1f710081e xplora xmove 2026-05-23 22:11:54 +02:00
José Rebelo defd82c01d Sony WF-1000XM5: Enable further capabilities (#3341) 2026-05-23 20:21:48 +01:00