Tag Archives: Android fitness

What’s new in Android Health

Posted by Sara Hamilton, Developer Relations Engineer

Health and fitness data is interconnected – sleep, nutrition, workouts and more all inform one another. For example, consider that your sleep impacts your recovery, which impacts your readiness to run your favorite 5k. Over time, your recovery and workout habits drive metrics like heart rate variability, resting heart rate, VO2Max and more! Often this data exists in silos, making it hard for users to get a holistic view of their health data.

We want to make it simple for people to use their favorite apps and devices to track their health by bringing this data together. They should have full control of what data they share, and when they share it. And, we want to make sure developers can enable this with less complexity and fewer lines of code.

This is why we’ve continued to improve our Android Health offerings, and why today at I/O 2023, we’re announcing key updates across both Health Connect and Health Services for app developers and users.

What is Android Health?

Android Health brings together two important platforms for developers to deliver robust health and fitness app to users; Health Connect and Health Services.

Health Connect is an on-device data store that provides APIs for storing and sharing health and fitness data between Android apps. Before Health Connect, there was not a consistent way for developers to share data across Android apps. They had to integrate with many different APIs, each with a different set of data types and different permissions management frameworks.

Now, with Health Connect, there is less fragmentation. Health Connect provides a consistent set of 40+ data types and a single permissions management framework for users to control data permissions. This means that developers can share data with less effort, enabling people to access their health data in their favorite apps, and have more control over data permissions.

Screenshot of permissions via Health Connect

Health Services is our API surface for accessing sensor data on Wear OS devices in a power-efficient way. Before Health Services, developers had to work directly with low-level sensors, which required different configurations on different devices, and was not battery-efficient.

With Health Services, there is now a consistent API surface across all Wear OS 3+ devices, allowing developers to write code once and run it across all devices. And, the Health Services architecture means that developers get great power savings in the process, allowing people to track longer workouts.

Health Connect is coming to Android 14 with new features

Health Connect and Android 14 logos with an X between them to indicate collaboration

Health Connect is currently available for download as an app on the Play Store. We are excited to announce that starting with the release of Android 14 later this year, Health Connect will be a core part of Android and available on all Android mobile devices. Users will be able to access Health Connect directly from Settings on their device, helping to control how their health data is shared across apps.

Screenshot showing Health Connect avaialble in the privacy settings of an Android device

Several new features will be shipped with the Health Connect Android 14 release. We’re adding a new exercise routes feature to allow users to share maps of their workouts through Health Connect. We’ve also made improvements to make it easier for people to log their menstrual cycles. And, Health Connect updates will be delivered through Google Play System Updates, which will allow new features to be updated often.

Health Services now supports more uses cases with new API capabilities

We’ve released several exciting changes to Health Services this year to support more use cases. Our new Batching Modes feature allows developers to adjust the data delivery frequency of heart rate data to support home gym use cases. We’ve also added new API capabilities, like golf shot detection.

The new version of Wear OS arrives later this year. Wear OS 4 will be the most performant yet, delivering improved battery life for the next generation of Wear OS watches. We will be releasing additional Health Services updates with this change, including improved background body sensor permissions.

Our developer ecosystem is growing

There are over 50 apps already integrated with Health Connect and hundreds of apps with health services, including Peloton, Withings, Oura, and more. These apps are using Health Connect to incorporate new data, to give people an interconnected health experience, without building out many new API integrations. Learn more about how these health and fitness apps are creating new experiences for users in areas like sleep, exercise, nutrition, and more in our I/O technical session.

We also have over 100 apps integrated with Health Services. Apps using Health Services are seeing higher engagement from users with Wear apps, and are giving their users longer battery life in the process. For example, Strava found that users with their Wear app did 25% more activities than those without.

Get started with Health Connect

We hope many more developers will join us in bringing unique experiences within Android Health to your users this year.

If you’d like to create a more interconnected health experience for your users, we encourage you to integrate with Health Connect. And if you are a Wear developer, make sure you are using Health Services to get the best battery performance and future proofing for all upcoming Wear OS devices.

Check out our Health Services documentation, Health Connect documentation, and code samples to get started!

To learn more, watch the I/O session:

Leading Health and Fitness Apps Roll Out Health Connect Integrations

Posted by Sara Hamilton, Developer RelationsEarlier this year, we introduced Health Connect as a way for app developers like you to have early access to a platform that securely shares health and fitness data across Android devices, with user consent. We collaborated with Samsung to build this platform which simplifies the connectivity between your apps while providing centralized privacy controls for users. We are now making the Health Connect (Beta) app available for download in Google Play to give users a central place to manage their privacy settings with granular controls to see which apps have access to data at any given time.

Today, 10+ health, fitness and wellness apps are rolling out integrations with the platform including early adopters of Health Connect like MyFitnessPal, Oura and Peloton.
Against a light blue background, an illustration of a person and their dog looking at a large screen with a 3x3 display of health app icons: Lifesum, Fitbit, MyFitnessPal, Dexcom, Samsung Health, Oura, Peloton, Flo,and WW.
Through the first wave of integrations, we have seen Health Connect provide many key benefits to developers.


Reduced fragmentation makes it easier to give users more holistic health insights

By enabling health and fitness apps to talk to each other, each app is able to provide a user with better, more holistic health insights.

In the past, developers had to establish multiple API connections to share data between different apps and each integration was costly to build and maintain. This limited developers’ data sharing capabilities and made it hard for users to unlock this data so that it could be utilized in different apps.

Now, with Health Connect, building an integration with a new app is as simple as reading in new data from Health Connect, rather than building a whole new integration.

For example, Android users will now be able to sync and get credit for their Peloton workouts in apps like Oura, MyFitnessPal, WeightWatchers and Lifesum. Now, through a single integration with Health Connect, Peloton Members will have the option to share their workout stats across the ecosystem of apps they use to support their overall wellness.

Phone screen showing App permissions for all apps that can access data stored in Health Connect

Standardized data schema ensures data consistency between apps

Health Connect provides a standardized data schema which supports 40+ data types across 6 categories. The schema is intuitive to use and covers a wide range of use cases, from exercises to sleep tracking to vital signs. It only requires just a few lines of code to read and write any of these data types in Health Connect. Health Connect even supports complex aggregations so that you can completely customize your queries to your app’s use case.

"With Health Connect APIs, our engineers were able to easily adapt their existing architecture in order to read and write user health data such as nutrition, hydration, exercise, and steps. With this integration, we're now able to consume data from any 3rd party application that also writes to Health Connect, expanding our users' choices while allowing them more flexibility to grant granular permissions about which data they want to share"
– Jason Peterson, Chief Technology Officer of MyFitnessPal


Centralize privacy controls for users, with less code

Previously, users had to navigate to multiple apps to manage data permissions. And, developers had to build out permissions management UIs themselves.

With Health Connect, users can easily manage permissions in a single place, with granular controls to see which apps are accessing data at any given time.

For developers, Health Connect provides the permissions management hub and granular permissions UIs out of the box, so you can set this up quickly.

Phone screen showing granular permissions for Run Tracker app to access in Health Connect
granular permissions screen that shows the different data types

For example, Signos was able to quickly set up permissions checks with Health Connect. “One aspect I was pleasantly surprised by was the user onboarding UX,” said Signos developer Jake Smith. “A simple, drop-in piece of code sets up the permissions so users can start reaping the benefits.”


We’re just getting started

Join the many developers who have already integrated with Health Connect and don’t miss out on the opportunity to develop richer insights for your users. Check out our documentation, helpful video tutorials, and code samples – and start building today!

Introducing Health Connect, a new API for Android app developers to securely access user health data

Posted by Chris Wilk, Product Manager

Android Jetpack with heart beat for health 

From helping you log your meals with MyFitnessPal to getting a holistic view of your health with Withings, apps and devices are a source for many kinds of useful health and fitness data. As Android developers, connecting and sharing this data between apps can help you provide more meaningful experiences and insights for your users. However, much of this information is spread across multiple experiences and different devices, making it difficult to bring together. Moreover, there are no centralized privacy controls for Android users.


Introducing Health Connect

This is why we’ve created Health Connect, a platform and API for Android app developers. With user permission, developers can use a single set of APIs to securely access and share health and fitness data across Android devices.

We're building this new unified platform in collaboration with Samsung to simplify connectivity between apps. We appreciate Samsung’s collaboration as we roll out Health Connect to foster richer app experiences while also providing centralized privacy controls for users.

We've been working with developers including MyFitnessPal, Leap Fitness and Withings as part of an early access program. In addition, Samsung Health, Google Fit and Fitbit are adopting Health Connect. Starting today, all developers can get access to Health Connect's common set of APIs for Android via Android Jetpack.

Health Connect fits in with Google’s wider efforts to help billions of people be healthier, using our platforms and technology to connect and bring more meaning to health information.


How does Health Connect work?

How Health Connect Works

How Health Connect Works

Health Connect supports many common health and fitness data types and categories, including: activity, sleep, nutrition, body measurements and vitals like heart rate and blood pressure.

With user permission, developers can securely read from and write data to Health Connect, using standardized schema and API behavior. Users will have full control over their privacy settings, with granular controls to see which apps are requesting access to data at any given time. The data in Health Connect is all on-device and encrypted. Users will have the ability to shut off access or delete data they don’t want on their device, and the option to prioritize one data source over another when using multiple apps.

Getting started

It’s easy to get started with Health Connect. Health Connect’s single set of APIs makes it simple to manage permissions and read and write data. Here’s an example of how you can request permissions and then write some data.

First, build a set of the permissions you plan to request read or write access to. In this example we are reading and writing steps and heart rate.

private val permissions =
  setOf(
    Permission.createReadPermission(Steps::class),
    Permission.createWritePermission(Steps::class),
    Permission.createReadPermission(HeartRate::class),
    Permission.createWritePermission(HeartRate::class),
  )

// then, create a permissions request for this set of permissions

Then, launch the permissions request, which will bring the user to the Health Connect permissions UI to grant permissions.

Once the user grants permission, you are ready to read and write data. Here’s an example of how to write steps data over a period of time. Include the total number of steps, start and end time, and timezone information, and then insert the data into Health Connect.

private suspend fun writeSomeData(client: HealthConnectClient) {
    val records = mutableListOf<Record>()

    records.add(
      Steps(
        count = 888,
        startTime = START_TIME,
        endTime = END_TIME,
        startZoneOffset = null,
        endZoneOffset = null,
      )
    )
    // add additional records as needed
}

Learn more

Health Connect is now available to developers: