Open akul43 opened 1 year ago
This task was not possible last semester, because Google had made an update where the Health Connect, instead of being a separate application, was converted into a framework module inside Android (as of Android 14).
The problem with an API being updated in Android is that when something gets deprecated in Android, you cannot use the old version. Furthermore, the transition to a framework module broke any previous ways to request permissions or attempts to access the health data.
However, thankfully permission support for Android 14 has been implemented. Refer to this release update here: https://github.com/matinzd/react-native-health-connect/releases/tag/v2.0.0
From here onwards, we'll reattempt trying to integrate Health Connect into the application.
Great news
The reattempt on Health Connect is successful, thanks to the updates on both the library and React Native. Hopefully Google doesn't make any more updates that break ways to access the API. We got the successful build along with Health Connect integration!
Health Connect User Flow completed and functional for Android 8-13
Implement Google Health connect modules to the app. I found this library: https://github.com/matinzd/react-native-health-connect that provides a react-native packaged library of health connect api. Check documentation for how to use.
Create a new folder in the service for all these files.