flutter-plugins
flutter-plugins copied to clipboard
[Health 10.2.0] Adding routes to workouts
Remember to specify the plugin name in the title!
Description
Describe what you will like to see improved/added/removed.
I have been experimenting a bit with the plugin and I realized that when trying to "writeWorkoutData", the only available parameters are the following:
/// Write workout data to Apple Health or Google Fit or Google Health Connect. /// /// Returns true if the workout data was successfully added. /// /// Parameters: /// - [activityType] The type of activity performed. /// - [start] The start time of the workout. /// - [end] The end time of the workout. /// - [totalEnergyBurned] The total energy burned during the workout. /// - [totalEnergyBurnedUnit] The UNIT used to measure [totalEnergyBurned] /// ONLY FOR IOS Default value is KILOCALORIE. /// - [totalDistance] The total distance traveled during the workout. /// - [totalDistanceUnit] The UNIT used to measure [totalDistance] /// ONLY FOR IOS Default value is METER. /// - [title] The title of the workout. /// ONLY FOR HEALTH CONNECT Default value is the [activityType], e.g. "STRENGTH_TRAINING".
I was wondering if there are any plans to include ROUTES in workouts, since when checking the Health Connect and Apple Health documentation, I've seen they are actually available.
In Health Connect, Exercise Sessions seem to include Routes. The constructor has an "exerciseRoute":
https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord
ExerciseSessionRecord( startTime: Instant, startZoneOffset: ZoneOffset?, endTime: Instant, endZoneOffset: ZoneOffset?, exerciseType: Int, title: String?, notes: String?, metadata: Metadata, segments: List<ExerciseSegment>, laps: List<ExerciseLap>, exerciseRoute: ExerciseRoute? )
and in Apple's Healthkit they seem to be available too: https://developer.apple.com/documentation/healthkit/workouts_and_activity_rings/creating_a_workout_route
It seems like ROUTES would be a pretty relevant part of many kinds of workouts so it would be really helpful if it was added to the plugin.
Thank you very much.