Open justingshreve opened 1 month ago
Hey!
Are you seeing any errors in ADB in Android Studio or It just returns empty array? Did you try putting it in try catch and see if an exception happens?
@matinzd thanks for the response. There are no errors logged and the function successfully returns an empty array. It does not throw an error. Do you have any examples of this working?
I'm having the same issue with the power data...
But starting with the elevation gain case (and using Samsung Health). Google Fit doesn't have the option to add elevation manually (at least I didn't find it): I've checked Health Connect and the elevation gain data isn't there (maybe Samsung Health didn't publish it?).
In the case of power, I entered the exercise manually via Google Fit and when checking this data on my app, the array comes empty. I checked on Health Connect and the potency data was there. I opened this issue: https://github.com/matinzd/react-native-health-connect/issues/125
Have you added any ElevationGained
records? It seems that both you and @gabrielgouv might be assuming these values are automatically calculated based on the ExerciseSession
, but that’s not the case. Health Connect should be viewed as a data store for different entities, and it doesn't automatically compute values based on other entities, as far as I know.
In both of your cases, it looks like you expect that by entering ExerciseSession
data, you would also get ElevationGained
and Power
data from Health Connect. However, I don't believe that's the intended purpose of Health Connect.
I have used Google Fit with a device and recorded a true activity with real elevation gain (not manually entered) and exercise session data comes through, just no elevation gain. The array is empty.
Did you check Health Connect app to see if ElevationGained
data is there for that specific timeframe?
Describe the bug I've logged an ExerciseSession (Samsung Health and Google Fit) which includes elevation gained. It syncs but the request to readRecords for ElevationGained returns an empty array. Distance comes back and the basic activity details, but no elevation.
To Reproduce Steps to reproduce the behavior:
react-native-health-connect
Expected behavior
Should return an array of elevation records, like the readRecords for 'Distance' that includes inMeters, etc.
Minimal Reproducible
Environment: