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

Workout metadata missing. #58

Open
ShineYang opened this issue Apr 3, 2023 · 2 comments
Open

Workout metadata missing. #58

ShineYang opened this issue Apr 3, 2023 · 2 comments

Comments

@ShineYang
Copy link

Describe the bug
When I use HealthKitReporter.workoutQuery(predicate) to retrieve workout data, harmonized.metadata always returns null.

To Reproduce
try { final workouts = await HealthKitReporter.workoutQuery(predicate); workouts.forEach((element) { print('metadata: ${element.harmonized.metadata}'); }); } catch (e) { print(e); }

Expected behavior
The metadata should look like this:
{HKAverageMETs: 4.85739 kcal/hr·kg, HKIndoorWorkout: 0, HKWeatherTemperature: 52.016 degF, HKWeatherHumidity: 7600 %, HKTimeZone: Asia/Shanghai, HKElevationAscended: 2403 cm}

Additional context
I think the reason might be that there's something wrong with Metadata.make()in the native code.

@jeybs
Copy link

jeybs commented Sep 7, 2023

Hoping for this fix.. need elevation gain for my existing project

@appsowner
Copy link

I have solution....for workout. i can use substrac 1 seconds for startDate and add 1 seconds for endDate.!

Regards!

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

No branches or pull requests

3 participants