Health Connect Jetpack SDK is now in beta and new feature updates

Health Connect Jetpack SDK is now in beta and new feature updates

Home » News » Health Connect Jetpack SDK is now in beta and new feature updates
Table of Contents

Posted by Brenda Shaw – Well being & House Associate Engineering Technical Author

At Google, we’re dedicated to empowering builders as they construct distinctive well being and health experiences. Core to that dedication is Well being Join, an Android platform that enables well being and health apps to retailer and share the identical on-device knowledge. Android units operating Android 14 or which have the pre-installed APK will robotically have Well being Join by default in Settings. For pre-Android 14 units, Well being Join is obtainable for obtain from the Play Retailer.

We’re excited to announce important Well being Join updates just like the Jetpack SDK Beta, new datatypes and new permissions that may allow richer, extra insightful app functionalities.

Jetpack SDK is now in Beta

We’re excited to announce the beta launch of our Jetback SDK! Since its preliminary launch, we have devoted important effort to enhancing knowledge completeness, with a selected deal with enriching the metadata related to every knowledge level.

Within the newest SDK, we’re introducing two key adjustments designed to make sure richer metadata and unlock new potentialities for you and your customers:

Make Recording Methodology Obligatory

To ship extra correct and insightful knowledge, the Beta introduces a requirement to specify certainly one of 4 recording strategies when writing knowledge to Well being Join. This ensures elevated knowledge readability, enhanced knowledge evaluation and improved person expertise:

In case your app presently doesn’t set metadata when making a report:

Earlier than

StepsRecord(
    depend = 888,
    startTime = START_TIME,
    endTime = END_TIME,
) // error: metadata isn't offered

After

StepsRecord(
    depend = 888,
    startTime = START_TIME,
    endTime = END_TIME,
    metadata = Metadata.manualEntry()
)

In case your app presently calls Metadata constructor when making a report:

Earlier than

StepsRecord(
    depend = 888,
    startTime = START_TIME,
    endTime = END_TIME,
    metadata =
        Metadata(
            clientRecordId = "shopper id",
            recordingMethod = RECORDING_METHOD_MANUAL_ENTRY,
        ), // error: Metadata constructor not discovered
)

After

StepsRecord(
    depend = 888,
    startTime = START_TIME,
    endTime = END_TIME,
    metadata = Metadata.manualEntry(clientRecordId = "shopper id"),
)

Make Machine Sort Obligatory

You’ll be required to specify machine sort when making a Machine object. A tool object might be required for Mechanically (RECORDING_METHOD_AUTOMATICALLY_RECORDED) or Actively (RECORDING_METHOD_ACTIVELY_RECORDED) recorded knowledge.

Earlier than

Machine() // error: sort not offered

After

Machine(sort = Machine.Companion.TYPE_PHONE)

We imagine these updates will considerably enhance the standard of information inside your functions and empower you to create extra insightful person experiences. We encourage you to discover the Jetpack SDK Beta and evaluation the up to date Metadata web page and familiarize your self with these adjustments.

New background reads permission

To allow richer, background-driven well being and health experiences whereas sustaining person belief, Well being Join now incorporates a devoted background reads permission.

This permission permits your app to entry Well being Join knowledge whereas operating within the background, offered the person grants express consent. Customers retain full management, with the power to handle or revoke this permission at any time through Well being Join settings.

Let your app learn well being knowledge even within the background with the brand new Background Reads permission. Declare the next permission in your manifest file:

<utility>
  <uses-permission android:title="android.permission.well being.READ_HEALTH_DATA_IN_BACKGROUND" />
...
</utility>

Use the Characteristic Availability API to test if the person has the background learn characteristic accessible, in accordance with the model of Well being Join they’ve on their units.

Permit your app to learn historic knowledge

By default, when granted learn permission, your app can entry historic knowledge from different apps for the previous 30 days from the preliminary permission grant. To allow entry to knowledge past this 30-day window, Well being Join introduces the PERMISSION_READ_HEALTH_DATA_HISTORY permission. This enables your app to supply new customers with a complete overview of their well being and wellness historical past.

Customers are answerable for their knowledge with each background reads and historical past reads. Each capabilities require builders to declare the respective permissions, and customers should grant the permission earlier than builders can entry their knowledge. Even after granting permission, customers have the choice of revoking entry at any time from Well being Join settings.

Extra knowledge entry and kinds

Well being Join now presents expanded knowledge sorts, enabling builders to construct richer person experiences and supply deeper insights. Take a look at the next new knowledge sorts:

    • Train Routes permits customers to share train routes with different apps for a seamless synchronized exercise. By permitting customers to share all routes or one route, their related train actions and maps for his or her exercises might be synced with the health apps of their alternative.

Fitness app asking permission to access exercise route in Health Connect

    • The pores and skin temperature knowledge sort measures peripheral physique temperature unlocking insights round sleep high quality, reproductive well being, and the potential onset of sickness.
    • Well being Join additionally supplies a deliberate train knowledge sort to allow coaching apps to write down coaching plans and exercise apps to learn coaching plans. Recorded workout routines (exercises) will be learn again for customized efficiency evaluation to assist customers obtain their coaching objectives. Entry granular exercise knowledge, together with classes, blocks, and steps, for complete efficiency evaluation and customized suggestions.

These new knowledge sorts empower builders to create extra related and insightful well being and health functions, offering customers with a holistic view of their well-being.

To be taught extra about all new APIs and bug fixes, try the full launch notes.

Get began with the Well being Join Jetpack SDK

Whether or not you’re simply getting began with Well being Join or wish to implement the newest options, there are various methods to be taught extra and have your voice heard.

    • Subscribe to our publication: Keep up-to-date with the newest information, bulletins, and assets from Google Well being and Health. Subscribe to our Well being and Health Google Developer Publication and get the newest updates delivered straight to your inbox.
    • Report a problem: Encountered a bug or technical subject? Report it on to our crew by the Situation Tracker so we will examine and resolve it. You can too request a characteristic or present suggestions with Situation Tracker.

We are able to’t wait to see what you create!

Supply hyperlink

author avatar
roosho Senior Engineer (Technical Services)
I am Rakib Raihan RooSho, Jack of all IT Trades. You got it right. Good for nothing. I try a lot of things and fail more than that. That's how I learn. Whenever I succeed, I note that in my cookbook. Eventually, that became my blog. 
share this article.

related posts .

Enjoying my articles?

Sign up to get new content delivered straight to your inbox.

Please enable JavaScript in your browser to complete this form.
Name