Android Health provides the following APIs to create health and fitness apps across form factors: Health Connect and Health Services on Wear OS. You can use one or both for your app experience.
This developer center includes guidance for using both APIs, and points to additional resources from across Android to help you build health and fitness apps.
Read and write on-device health and fitness data using Health Connect
Health Connect is an Android platform that allows health and fitness apps to store and share the same on-device data, within a unified ecosystem. It also offers a single place for users to control which apps can read and write health and fitness data. Health Connect supports reading and writing over 50 different data types, from cycling speed to body temperature. If you're building a new app, we recommend you use Health Connect.
Get Started with Health Connect
Access high-quality sensor data with Health Services on Wear OS
Health Services on Wear OS is an API that acts as an intermediary to the various sensors and related algorithms on Wear OS devices. The API provides apps with high-quality data related to activity, exercise, and health, in a battery-efficient way. Health Services is consistent across devices running Wear OS 3 or higher, meaning you only need to write your app once, and Health Services takes care of ensuring the app performs the same, regardless of the device.
Get Started with Health Services
Android Health across devices
Health Connect is only available on Android mobile devices. However, if you have other data sources connected to your mobile app, such as a wearable, you can use your mobile app to facilitate the data transfer from the wearable to Health Connect and correspondingly from Health Connect to the wearable.
At this time, Health Services is only available for Wear OS
devices running Wear OS 3 or higher. For all other devices, including phones,
you should consult the documentation for SensorManager
.
Companion Device Manager and Bluetooth connectivity are additional options to connect companion devices that don't run Wear OS.
You might be familiar with the Google Fit Android API, which supports many fitness-related actions such as reading near-time and historic data and recording activities. The Google Fit Android API has been marked as deprecated. If your app uses the Google Fit Android API, consult the migration guide to learn about alternatives for maintaining your app's capabilities. Many of the actions you can perform with the Google Fit Android API can be done with Android Health APIs. For example, you can use the Recording API on mobile instead of the Google Fit Recording API.
To plan out which APIs to use, you should consult the following data types guides to understand what data you could potentially read from Health Connect and what data you could use Health Services to read from Wear OS devices:
The most complete multidevice experiences use both Health Services and Health Connect to offer the most value for users.