matinzd/react-native-health-connect

No data retrieved ,when no other app like google fit or wearables attached to health connect

akashSinghBaghel opened this issue ยท 4 comments

Issue: No Data Fetch from Health Connect After Migrating from Google Fit
Description:
We were previously using the Google Fit REST API to fetch health statistics in our React Native app. After migrating to Health Connect, we uninstalled Google Fit from the device and have no wearables attached. Consequently, we are not receiving any data from Health Connect.

Expected Behavior:
Data should be fetched from Health Connect.

Steps to Reproduce:

Migrate from Google Fit REST API to Health Connect API.
Uninstall Google Fit from the device.
Ensure no wearables are attached or synced with Health Connect.
Attempt to fetch health data using Health Connect API.
Environment:

Health Connect Version: 2.0.5
React Native Version: 0.72.4
New architecture enabled: Yes

Additional Information:
Our app requires reading health data solely from Health Connect without relying on Google Fit or any wearables.

Request:
We are looking for a solution to ensure that health data can be read from Health Connect under the given conditions.

Facing the same issue while integrating health connect , any solution ?

I am also facing same issue, anybody have answer if health connect provides data when it sync data from another fitness app like "Google Fit". How to handle the case when user disabled the sinking data from third party app or user don't have any other third party app for sinking data, alert user for downloading third party app and enable sinking.

Health Connect itself doesn't provide information or data to you. You either need to write data yourself or enable access from other apps to write data into it. Google Fit is different and you should not expect this library work that way.

Read more here about the comparison guide:

https://developer.android.com/health-and-fitness/guides/health-connect/migrate/comparison-guide

And please for future the references, do not spam the repo with different issues and multiple accounts. Please wait for some time and I will answer your question.