- Notifications
You must be signed in to change notification settings - Fork 0
Integrate Health Connect for workout syncing and permissions#40
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
Merged
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
b3820ad
feat: integrate Health Connect for workout syncing and permissions
Devasy 5d40dab
feat: enhance Health Connect integration with permission handling and…
Devasy 564b773
feat: integrate Health Connect, add workout provider logic, and updat…
Devasy 796279a
feat: implement dependency injection and modularize service managemen…
Devasy f1808cd
Update workout-logger/test/health_sync_manager_test.dart
Devasy af29b29
feat: synchronize HistoryManager cache with WorkoutProvider session u…
Devasy 67658dc
feat: enhance workout session syncing with improved timestamp handlin…
Devasy 08922a5
feat: update Codecov action to version 5 and ensure token usage
Devasy 4d69d5c
feat: improve workout session syncing by clamping timestamps and merg…
Devasy 12658ab
feat: integrate health connect version retrieval in ProfileScreen
Devasy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -24,7 +24,11 @@ android { | ||
| applicationId = "com.devasy.repforge" | ||
| // You can update the following values to match your application needs. | ||
| // For more information, see: https://flutter.dev/to/review-gradle-config. | ||
| minSdk = flutter.minSdkVersion | ||
| // MIGRATION NOTE: minSdk is intentionally set to 26 (Android 8.0 Oreo). | ||
| // Health Connect requires API 26+. Devices running API <26 are no longer | ||
| // supported. If downgrading, remove the health_connector dependency and | ||
| // all HealthConnectService usages, then restore minSdk to flutter.minSdkVersion. | ||
| minSdk = 26 | ||
Devasy marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| targetSdk = flutter.targetSdkVersion | ||
| versionCode = flutter.versionCode | ||
| versionName = flutter.versionName | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,7 @@ | ||
| <manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| <uses-permission android:name="android.permission.health.WRITE_EXERCISE" /> | ||
| <uses-permission android:name="android.permission.health.READ_EXERCISE" /> | ||
Devasy marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| <application | ||
| android:label="RepForge" | ||
| android:name="${applicationName}" | ||
| @@ -24,7 +27,22 @@ | ||
| <action android:name="android.intent.action.MAIN"/> | ||
| <category android:name="android.intent.category.LAUNCHER"/> | ||
| </intent-filter> | ||
| <!-- Required for Health Connect to show permissions dialog and list app in HC settings --> | ||
| <intent-filter> | ||
| <action android:name="androidx.health.ACTION_SHOW_PERMISSIONS_RATIONALE" /> | ||
| </intent-filter> | ||
| </activity> | ||
| <!-- Required on Android 14+ so Health Connect can open your app's privacy rationale --> | ||
| <activity-alias | ||
| android:name="ViewPermissionUsageActivity" | ||
| android:exported="true" | ||
| android:targetActivity=".MainActivity" | ||
| android:permission="android.permission.START_VIEW_PERMISSION_USAGE"> | ||
| <intent-filter> | ||
| <action android:name="android.intent.action.VIEW_PERMISSION_USAGE" /> | ||
| <category android:name="android.intent.category.HEALTH_PERMISSIONS" /> | ||
| </intent-filter> | ||
| </activity-alias> | ||
| <!-- Don't delete the meta-data below. | ||
| This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --> | ||
| <meta-data | ||
| @@ -41,5 +59,10 @@ | ||
| <action android:name="android.intent.action.PROCESS_TEXT"/> | ||
| <data android:mimeType="text/plain"/> | ||
| </intent> | ||
| <!-- Health Connect availability check --> | ||
| <package android:name="com.google.android.apps.healthdata" /> | ||
| <intent> | ||
| <action android:name="androidx.health.ACTION_SHOW_PERMISSIONS_RATIONALE" /> | ||
| </intent> | ||
| </queries> | ||
| </manifest> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Consider adding
fail_ci_if_error: trueto surface upload failures.Without this, a failed upload (bad token, network error) is silently swallowed and the step still shows green. The official Codecov action example explicitly includes
fail_ci_if_error: truefor exactly this reason.⚙️ Proposed addition
- name: Upload coverage to Codecov uses: codecov/codecov-action@v5 with: files: workout-logger/coverage/lcov.info token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: true🤖 Prompt for AI Agents