Skip to content

Healthfit with Android Override - #4690

Merged
cagnulein merged 43 commits into
masterfrom
healthfit-override
Jun 10, 2026
Merged

Healthfit with Android Override#4690
cagnulein merged 43 commits into
masterfrom
healthfit-override

Conversation

@cagnulein

Copy link
Copy Markdown
Owner

No description provided.

@cagnulein

Copy link
Copy Markdown
Owner Author

it should close the #3613

@cagnulein

Copy link
Copy Markdown
Owner Author

depends from #4605

cagnulein and others added 14 commits June 5, 2026 21:16
…ce write

- Replace HealthConnectHelper.java stub with full Kotlin implementation
- Add HealthConnectPermissionActivity.kt for permission request flow
- Wire healthConnectWriteWorkout() in homeform.cpp fit_save_clicked() —
  this was the root cause of no activity being created on workout stop
- Power (PowerRecord) and cadence (CyclingPedalingCadenceRecord) are now
  written for all device types that emit non-zero values
- Add Kotlin plugin, activity-ktx, and Health Connect write permissions
  to build.gradle and AndroidManifest.xml (compileSdk bumped to 35)
- Add 20 local JUnit tests covering exerciseType mapping, buildRecords
  logic, power/cadence inclusion, and edge cases

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… introduced by rebase

Removes 4 duplicate lines in build.gradle (kotlin classpath, apply plugin,
activity-ktx dependency, kotlin.srcDirs) and 2 duplicate blocks in
AndroidManifest.xml (second ViewPermissionUsageActivity alias targeting
CustomQtActivity, duplicate HealthConnectPermissionActivity without
intent-filter) that were left from conflict resolution during rebase.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tial permissions

- Replace one-shot SHOWN guard with iOS-like behaviour: every app start,
  check missing permissions and show the dialog if any are absent
  (guarded only by PENDING flag to avoid double-showing)
- Remove PREF_PERMISSION_PROMPT_SHOWN constant (no longer used)
- writeWorkoutJson now only requires WRITE_EXERCISE; all other permissions
  (distance, calories, HR, power, speed, cadence) are optional — records
  for ungranted permissions are silently skipped instead of aborting the
  whole write
- buildRecords accepts an optional grantedPermissions set (default = all)
  so existing unit tests are unaffected

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Automatic update of translatable strings extracted from source code.
Updated 30 language files in src/translations/

- Updated by GitHub Actions (Testing Mode)
- Triggered by: pull_request
- Date: 2026-06-08 13:37:16 UTC
… records

Add ElevationGainedRecord, StepsRecord, HeartRateVariabilityRmssdRecord and
StepsCadenceRecord to Health Connect export. Treadmill cadence now uses
StepsCadenceRecord (steps/min) instead of CyclingPedalingCadenceRecord.
Update AndroidManifest.xml with the four new write permissions and extend
unit tests to cover all new record types.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Automatic update of translatable strings extracted from source code.
Updated 30 language files in src/translations/

- Updated by GitHub Actions (Testing Mode)
- Triggered by: pull_request
- Date: 2026-06-08 16:12:40 UTC
Switch ExerciseSessionRecord metadata from RECORDING_METHOD_MANUAL_ENTRY
to RECORDING_METHOD_ACTIVELY_RECORDED so Health Connect displays the app
name (QZ) as the data source, matching how Peloton and other apps appear.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@cagnulein cagnulein added this to the 2.21 milestone Jun 10, 2026
@cagnulein
cagnulein merged commit b01ede9 into master Jun 10, 2026
25 of 27 checks passed
@cagnulein
cagnulein deleted the healthfit-override branch June 10, 2026 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant