react-native-health-connect
react-native-health-connect copied to clipboard
Sleep recordType value mismatch between methods
Describe the bug
requestPermission() requires permission name as SleepSession and getGrantedPermissions() returns Sleep
To Reproduce
Steps to reproduce the behavior:
- Trigger
requestPermission([{accessType: 'read', recordType: 'SleepSession'}]) - Trigger
getGrantedPermissions() - See permissions array from
getGrantedPermissions
Expected behavior
recordType should match on both methods
Screenshots
Environment:
- Health Connect Version: 1.2.3
- React Native Version: 0.73.1
- New architecture enabled: Yes
It seems like this inconsistency comes from the health connect core. I will try to investigate this.
Same for (at least): ExerciseSession --> Exercise HeartRateVariabilityRmssd -> HeartRateVariability MenstruationFlow -> Menstruation
... and probably few others that I don't use
Hi any ETA on this? I'm happy to contribute if it's not picked or you're able to hand over.
Hey @matinzd, created a PR for a potential solution for this. If you could take a quick look whenever you can it would be grand, thanks in advance!
This should be fixed in v3.1.1.