-
Notifications
You must be signed in to change notification settings - Fork 748
Health 13 - Refactored Android Native Implementation #1215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add SPEED(Android), WALKING_SPEED(iOS) data types.
Add `SPEED` and `WALKING_SPEED` Data Type
Fix writing `SPEED` issue in Android
Health 13.1.0 - Refactored Android Implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the Android native implementation into modular classes and adds support for new health data types (SPEED on Android, WALKING_SPEED on iOS) with the corresponding METER_PER_SECOND unit, along with version bumps to 13.1.0.
- Bumped package versions to 13.1.0 in pubspec, podspec, and CHANGELOG.
- Introduced WALKING_SPEED (iOS) and SPEED (Android) data types with unit METER_PER_SECOND.
- Split Android plugin logic into HealthDataOperations, HealthRecordingFilter, HealthDataConverter, and HealthConstants.
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
packages/health/pubspec.yaml | bumped version to 13.1.0 |
packages/health/lib/src/heath_data_types.dart | added WALKING_SPEED and SPEED types and unit mappings |
packages/health/lib/health.g.dart | updated serialization maps for new types and units |
packages/health/ios/health.podspec | bumped iOS podspec version to 13.1.0 |
packages/health/ios/Classes/SwiftHealthPlugin.swift | added WALKING_SPEED type and METER_PER_SECOND unit support |
packages/health/ios/Classes/HealthConstants.swift | added constants for WALKING_SPEED and METER_PER_SECOND |
packages/health/example/lib/util.dart | updated example data type lists with new types |
packages/health/example/lib/main.dart | added example write logic for WALKING_SPEED and SPEED |
packages/health/android/src/main/kotlin/cachet/plugins/health/HealthRecordingFilter.kt | new record filtering utility |
packages/health/android/src/main/kotlin/cachet/plugins/health/HealthDataOperations.kt | new class handling permissions and data operations |
packages/health/android/src/main/kotlin/cachet/plugins/health/HealthDataConverter.kt | new converter from Health Connect records to Flutter maps |
packages/health/android/src/main/kotlin/cachet/plugins/health/HealthConstants.kt | new Android constants and type mappings |
packages/health/README.md | updated documentation for WALKING_SPEED |
packages/health/CHANGELOG.md | added 13.1.0 changelog entries |
The PR for introducing the refactored of Android native implementation. Similarly to the Swift refactor there are now the following files:
All the files and function are documented as well. Below each files jobs are explained briefly:
getData
,getAggregateData
, etc.)object
for better performance