Installation
React Native ==> Health Connect module
Health Connect has its own module in the React Native Inform SDK Wrapper, therefore the following modules are required to use the Health Connect integration:
- Session (core)
- Health Connect (healthconnect)
To install the package, use the following command:
yarn add @validic-mobile/react-native-inform-healthconnect --registry https://validic.jfrog.io/artifactory/api/npm/mobile-npm-release/
Dependency Requirements
Health Connect Client requires building with at least Android Gradle plugin 8.6.0 or higher. If you receive the following error:
Dependency 'androidx.health.connect:connect-client:1.1.0-beta01' requires Android Gradle plugin 8.6.0 or higher.
then ensure that your project is using Android Gradle Plugin version 8.6.0 or higher
buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:8.6.0'
}
}
Additionally, make sure your Gradle wrapper is updated to a compatible version by modifying the gradle-wrapper.properties
file:
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
After making these changes, sync your project with Gradle and rebuild.
Importing the Module
import {
ValidicHealthConnect,
DataType,
launchPlayStore,
} from '@validic-mobile/react-native-inform-healthconnect';
Updated 13 days ago