Why use Health Bridge?
Health Bridge takes care of handling platform-specific details like permissions, data sources, and user consent, so you can focus on delivering value to your users. The plugin abstracts away the complexity of working with different health platforms while maintaining full access to rich health data.- Unified interface: Single API that works across iOS (Apple HealthKit) and Android (Google Health Connect)
- Platform handling: Automatically manages platform-specific permissions, data sources, and user consent flows
- Wellness features: Access comprehensive health metrics including steps, heart rate, calories, sleep, and more
- Data accessibility: Retrieve historical health data with flexible date ranges and grouping options
Before you start
Prerequisites- A Median app with the JavaScript Bridge enabled
- The plugin activated in your app
Key concepts
The following concepts will help you implement Health Bridge: Quick reference: Health Bridge supports 6 main categories of health data to help you build comprehensive wellness features:- Activity - Track physical movement and exercise metrics (steps, distance, calories, exercise time)
- Body measurements - Monitor physical characteristics and body composition (height, weight, BMI, body fat, temperature)
- Cycle tracking - Access menstrual cycle data for reproductive health monitoring
- Nutrition - Track dietary intake and hydration (calorie intake, water intake, nutrition data)
- Sleep - Monitor sleep patterns and duration for recovery and wellness insights
- Vitals - Access critical health indicators (heart rate, blood pressure, oxygen saturation, glucose)
Activity features
Activity features
Body measurements
Body measurements
Cycle tracking
Cycle tracking
Nutrition
Nutrition
Sleep
Sleep
Vitals
Vitals
- Android: Returns a list of granted and declined data types when requesting permissions
- iOS: Does not return any information about permission status. The OS will prompt the user when data is first requested, and you won’t get confirmation about which permissions were granted
- All health data values are returned in metric units only
- Our team can add support for additional data types if required
- Some data types (like sleep) may only be available for recent timeframes
- Date range limitations vary by platform and data type
Integration guide
Follow the steps below to configure the plugin and use the JavaScript Bridge functions.App configuration
Enable the plugin
- Navigate to Plugins: In Median App Studio, go to Native Plugins and select Health Bridge
- Enable Health Bridge: Toggle Plugin Enabled on
- Configure the iOS permission description: Explain to users why your app needs access to their Health data (see below)
- Select Android read permissions: Enable only the health data types your app uses (see below)
- Save and rebuild: Click Save and rebuild your app for the changes to take effect

Health Bridge plugin configuration
JavaScript Bridge functions
Follow these steps to start using the Health Bridge plugin in your app:Step 1: Request permissions
Although not required, we recommend callingrequestPermissions() upfront as it improves user transparency and experience. This prompts users to grant access to the specific health data types your app will use.
requestPermissions() and directly call getData() (next step), and the OS will handle permissions automatically.
Step 2: Fetch health data
After permissions are granted (or requested implicitly), use thegetData() method to retrieve health data. You can define the following parameters:
- The specific
dataTypesto fetch (from the supported list) - A
startDateandendDatein ISO 8601 format - An optional
bucketto group data (for example, by day or hour)
Bucket options:
bucket: 'day' and map the values to your chart component.
Tip: Make sure your date range doesn’t exceed platform limitations. Some data types (like sleep) may only be available for recent timeframes.
Example response
Integration testing
Testing on iOS
Step 1: Install your app
Based on your test setup, you can install the app on a physical device via TestFlight or iOS binary. If you install the app using TestFlight or an iOS binary, the app comes fully built including the necessary capabilities. Build locally with Xcode If you want to build and test the app locally on macOS, follow the steps below to build your iOS app from source and add the HealthKit capability. You can reference the following to confirm that the capability has been added as expected:
Xcode app with HealthKit capability





