Introducing Well being Join, a brand new API for Android app builders to securely entry consumer well being information

Written by Chris Welk, Product Supervisor

Health Connect logo and Android Jetpack logo

From serving to you log your meals with MyFitnessPal to getting a complete view of your well being with Withings, apps and units are a supply of many sorts of helpful well being and health information. As Android builders, connecting and sharing this information between apps will help you ship extra helpful experiences and insights to your customers. Nevertheless, a variety of this data is unfold throughout a number of experiences and totally different units, which makes it tough to mix them. Moreover, there are not any central privateness controls for Android customers.

Introducing Well being Join

This is the reason we created Well being JoinIt’s a platform and API for Android app builders. With the consumer’s permission, builders can use a single set of APIs to securely entry and share well being and health information throughout Android units.

We’re constructing this new unified platform in collaboration with Samsung to simplify communication between apps. We respect Samsung’s collaboration in the course of the launch of Well being Join to reinforce richer app experiences whereas offering centralized privateness controls for customers.

We have labored with builders together with MyFitnessPal, Leap Health and Withings as a part of the Early Entry program. As well as, it adopts Samsung Well being, Google Match, and Fitbit Well being Join. Beginning right this moment, all builders can entry the set of in style Well being Join app APIs for Android through the Android Jetpack.

Matches Well being Join with recordsdata Google’s broader efforts To assist billions of individuals get higher well being, through the use of our platforms and expertise to attach and make well being data extra significant.

How does Well being Join work?

How does Health Connect work

How does Well being Join work

Well being Join helps many in style well being and health information sorts and classes, together with: exercise, sleep, diet, physique measurements, and vitals equivalent to coronary heart fee and blood strain.

With consumer permission, builders can securely learn and write information to Well being Join, utilizing a standardized schema and conduct API. Customers may have full management over their privateness settings, with exact controls to see which apps are requesting entry to information at any time. All information in Well being Join is put in on the machine and encrypted. Customers may have the flexibility to show off entry or delete information they do not need on their machine, and the choice to prioritize one information supply over one other when utilizing a number of apps.


It is simple to get began with Well being Join. Well being Join’s set of single APIs make it straightforward to handle permissions and skim and write information. Right here is an instance of methods to request permissions after which write some information.

First, create a set of permissions that you just plan to require learn or write entry to. On this instance we learn and write steps and coronary heart fee.

personal val permissions =

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

Subsequent, run the Permissions Request, which is able to take the consumer to the Well being Join Permissions UI to grant the permissions.

When you give the consumer permission, you might be able to learn and write the information. Right here is an instance of methods to write information for steps over a time frame. Embrace the overall variety of steps, begin and finish time, and time zone data, then enter the information into Well being Join.

personal droop enjoyable writeSomeData(shopper: HealthConnectClient) {
    val data = mutableListOf<Report>()

        rely = 888,
        startTime = START_TIME,
        endTime = END_TIME,
        startZoneOffset = null,
        endZoneOffset = null,
    // add further data as wanted

be taught extra

Well being Join is now accessible to builders:

Watch the technical session beneath:

The Information Weblog The place You Get The Information First
Android Builders Weblog
#Introducing #Well being #Join #API #Android #app #builders #securely #entry #consumer #well being #information