React Health Connect integration works by wrapping Android's Health Connect API through a native module, then requesting per-record-type permissions at runtime. Use react-native-health-connect (React Native 0.71+ with the latest patch for v2) or an Expo config-plugin package; Health Connect is built into Android 14+ and installable from Google Play on Android 10–13.
Set Up Health Connect in a React Native App
- Confirm your baseline. Check that your project runs React Native 0.71 or later on the latest patch release if you plan to use v2 of
react-native-health-connect; older versions need the v1 line. Health Connect itself targets Android 10 (API 29) and above. - Install the library. Run
npm install react-native-health-connectin your project root, then rebuild the native app rather than relying on a Metro reload, since this ships a native module. - Declare the Health Connect permissions you actually use. Add the specific
android.permission.health.*uses-permissionentries toAndroidManifest.xml, or let an Expo config plugin generate them. A bare React Native app that skips the plugin must declare these itself, because the module manifest ships none. - Check Health Connect availability at runtime. Before any read or write, call the library's availability or SDK-status check. If Health Connect isn't present (older devices, some OEM images), route the user to the Google Play listing instead of failing silently.
- Request permissions with a visible rationale. Trigger the permission contract so Android shows the Health Connect consent screen. Handle denial as a normal state, not an error—users can grant partial access per data type.
- Read, aggregate, or write records. Query by record type and time range, or write records back. Verify success by re-reading a small range immediately after a write.
That runtime availability check in step 4 is the most-skipped step and the usual cause of a blank screen on a test device.
Handle Android Version and Expo Splits
Android 14 and Later
Health Connect is part of the platform, so no separate install is required. Availability checks usually return ready, and the consent UI is the standard system flow.
Android 10 Through 13
Health Connect is a standalone app from Google Play. Detect its absence, then send the user to the store listing and re-check on return. Do not block the whole app behind the install—gate only the health features.
Expo Managed and Dev-Client Projects
Native Health Connect modules don't run in Expo Go. Use a development build or a config-plugin package that declares permissions and raises minSdk to 26 automatically. Managed projects that never run the plugin must add the uses-permission entries manually and keep the native build in sync.
Post-Setup Adjustments and Common Blockers
Permissions granted but reads return nothing. Empty results usually mean no app has written that record type yet, or the user granted only a subset. Show a state that distinguishes "no data" from "no access."
Permission dialog never appears. The consent screen only shows when at least one permission is declared in the manifest and requested in code. A missing manifest entry produces a silent no-op.
Works in debug, fails in release. A stale native build is the typical cause after adding the module or editing the manifest. Do a clean native rebuild.
Expo Go throws a native module error. Expected—switch to a dev client or a config-plugin setup.
minSdk build failure. Config plugins raise minSdk to 26; bare projects must bump it manually in android/build.gradle.
Multiple health libraries conflict. Pick one wrapper package and remove the others, since each declares overlapping permissions and record-type mappings.
Read, Write, and Aggregate Safely
Health Connect stores data on-device and exposes it through typed records, so scoped queries beat full dumps. Request only the record types and time windows you display, and prefer aggregation endpoints for step counts or totals rather than pulling raw samples. For write access, confirm the user understands what your app contributes, because Health Connect permissions are per-app and revocable at any time.
Treat permission state as volatile: re-check on every app foreground. A user who revokes access in the Health Connect settings will otherwise hit failures the next time your code assumes a cached grant.
Frequently Asked Questions
Does React Health Connect work on iOS?
No. Health Connect is Android-only; iOS uses HealthKit, so you need a separate library or a cross-platform wrapper that abstracts both under one API.
Which Android versions support Health Connect?
Android 10 (API 29) and above. It's built into Android 14+ and installed separately from Google Play on Android 10–13.
Why does the permission dialog not open?
Either no android.permission.health.* entry is declared in the manifest, or the request wasn't initiated after the availability check confirmed Health Connect is present.
Can I use it in Expo Go?
Not with native modules. Use a development build or an Expo config-plugin package; Expo Go can't load the native Health Connect module.