matinzd/react-native-health-connect

Nutrition Record: asking for permission and reading

jtli opened this issue · 3 comments

jtli commented

I can't tell if I missed something, but when trying to ask for permission (using requestPermission) I couldn't find a record type that corresponds to Nutrition. I checked in src/types/records.types.ts for type HealthConnectRecord and Nutrition wasn't listed there.
Same thing with calling readRecords (using readRecords).

Is it actually not supported, or if it is, how do I ask for permission and read nutrition?

I can see NutritionRecord in records.types.ts, but it is not included in HealthConnectRecord.

UPDATE:

As we have a lot of data types, I forgot to expose recordType property and NutritionRecord interface. I will send a patch very soon.
Sorry about that!