Skip to main content

Introduction

The Open Wearables React Native SDK (open-wearables) enables secure background synchronization of health data from Apple HealthKit (iOS), Samsung Health, and Health Connect (Android) to the Open Wearables platform. The SDK is built with the Expo Module API, so it works in Expo projects as well as in bare React Native projects with Expo modules installed. On iOS, the React Native SDK is a wrapper around the native iOS SDK (open_wearables_ios_sdk). On Android, it wraps the native Android SDK (open_wearables_android_sdk). This means all the core sync logic — background execution, streaming uploads, secure storage, and retry mechanisms — is handled by the native implementations under the hood. The React Native layer provides a convenient TypeScript API for cross-platform apps.

React Native SDK Repository

View source code, report issues, and contribute to the React Native SDK.

Native iOS SDK

See the native iOS SDK documentation for the underlying iOS implementation.

Native Android SDK

See the native Android SDK documentation for the underlying Android implementation.

Features

  • Cross-Platform - Single TypeScript API for iOS (HealthKit) and Android (Samsung Health, Health Connect)
  • Background Sync - Health data syncs even when your app is in the background
  • Incremental Updates - Only syncs new data using anchored queries
  • Secure Storage - Credentials stored in iOS Keychain / Android EncryptedSharedPreferences
  • Dual Authentication - Token-based auth with auto-refresh or API key authentication
  • Resumable Sessions - Sync sessions survive app restarts
  • Wide Data Support - Steps, heart rate, workouts, sleep, and 40+ data types
  • Provider Selection - Choose between Samsung Health and Health Connect on Android

Requirements

Installation

Temporary setup. The package is not published to npm yet, and its Android native dependency is only available through Maven Local. We’re working on publishing the package to npm and serving the Android dependency from a public repository - steps 1 and 3 below will then become a plain npm install.
1

Install the package from GitHub

npm builds the package during install. Pin a commit so updates are deliberate. The package is imported as open-wearables.
2

Add the config plugin

Required for Expo projects - it sets the iOS HealthKit entitlements, Info.plist keys and background modes, and the Android Health Connect activity aliases. Set the Android minSdkVersion in the same file, which needs expo-build-properties:
app.json
Bare React Native projects set these by hand - see Expo and bare React Native setup.
3

Android: publish the native SDK to Maven Local

This also installs the Samsung Health SDK the native SDK depends on. Then run npx expo prebuild in your app and add mavenLocal() as the first repository in android/build.gradle:
android/build.gradle
Repeat this on every machine that builds the app, including CI. npx expo prebuild --clean regenerates android/, so add mavenLocal() again afterwards.
4

Build and run

Bare React Native: run npx pod-install before building for iOS.

Quick Start

The minimal flow - see the Integration Guide for when to call what:

Events

Subscribe to native SDK events using the standard Expo module event emitter:

Documentation

Integration Guide

Authentication, backend endpoint, and SDK lifecycle - the same for every SDK.

React Native calls

The React Native code for each integration step, plus Expo setup.

Troubleshooting

Common issues and their solutions for iOS and Android.

Supported Health Data Types

The SDK supports 40+ health data types across multiple categories:
Not all data types are available on all providers. Samsung Health supports a subset of types compared to Health Connect and HealthKit. See the Android SDK docs for provider-specific availability.

Next Steps

Integration Guide

Complete step-by-step integration guide.

API Reference

Full API documentation on GitHub.