Skip to content
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

[HEALTH] Error requesting health data type 'HealthWorkoutActivityType.BIKING_MOUNTAIN #835

Closed
rafaellop opened this issue Nov 20, 2023 · 1 comment · Fixed by #836 or #884
Closed
Labels
bugfix a bug fix

Comments

@rafaellop
Copy link
Contributor

Device / Emulator and OS

  • Device: Samsung S21
  • OS: Android 13

Describe the bug

When trying to save a workout with health.writeWorkoutData() exception occurs for the HealthWorkoutActivityType.BIKING_MOUNTAIN activityType like this:

Exception has occurred.
HealthException (Error requesting health data type 'HealthWorkoutActivityType.BIKING_MOUNTAIN' - cause: Workout activity type HealthWorkoutActivityType.BIKING_MOUNTAIN is not supported on Android)

Flutter doctor

[√] Flutter (Channel stable, 3.13.9, on Microsoft Windows [Version 10.0.22000.2538], locale pl-PL)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[√] Chrome - develop for the web
[√] Android Studio (version 3.2)
[√] Android Studio (version 2021.3)
[√] VS Code (version 1.84.1)
[√] Connected device (4 available)
[√] Network resources

Additional information

The enum HealthWorkoutActivityType {} defined in the data_types.dart should be verified for other issues like that.

@rafaellop rafaellop added the bugfix a bug fix label Nov 20, 2023
@rafaellop rafaellop changed the title [HEALTH] Exception has occurred. HealthException (Error requesting health data type 'HealthWorkoutActivityType.BIKING_MOUNTAIN' - cause: Workout activity type HealthWorkoutActivityType.BIKING_MOUNTAIN is not supported on Android) [HEALTH] Error requesting health data type 'HealthWorkoutActivityType.BIKING_MOUNTAIN Nov 20, 2023
@rafaellop
Copy link
Contributor Author

It seems the _isOnAndroid() function in health_factory.dart doesn't have updated list of workout FitnessActivities available on Android. I'll try to complete the list and send a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix a bug fix
Projects
None yet
1 participant