12 March 2025
At Google, we are committed to empowering developers as they build exceptional health and fitness experiences. Core to that commitment is Health Connect, an Android platform that allows health and fitness apps to store and share the same on-device data. Android devices running Android 14 or that have the pre-installed APK will automatically have Health Connect by default in Settings. For pre-Android 14 devices, Health Connect is available for download from the Play Store.
We're excited to announce significant Health Connect updates like the Jetpack SDK Beta, new datatypes and new permissions that will enable richer, more insightful app functionalities.
We are excited to announce the beta release of our Jetback SDK! Since its initial release, we've dedicated significant effort to improving data completeness, with a particular focus on enriching the metadata associated with each data point.
In the latest SDK, we’re introducing two key changes designed to ensure richer metadata and unlock new possibilities for you and your users:
To deliver more accurate and insightful data, the Beta introduces a requirement to specify one of four recording methods when writing data to Health Connect. This ensures increased data clarity, enhanced data analysis and improved user experience:
If your app currently does not set metadata when creating a record:
Before
StepsRecord( count = 888, startTime = START_TIME, endTime = END_TIME, ) // error: metadata is not provided
After
StepsRecord(
count = 888,
startTime = START_TIME,
endTime = END_TIME,
metadata = Metadata.manualEntry()
)
If your app currently calls Metadata constructor when creating a record:
Before
StepsRecord( count = 888, startTime = START_TIME, endTime = END_TIME, metadata = Metadata( clientRecordId = "client id", recordingMethod = RECORDING_METHOD_MANUAL_ENTRY, ), // error: Metadata constructor not found )
After
StepsRecord( count = 888, startTime = START_TIME, endTime = END_TIME, metadata = Metadata.manualEntry(clientRecordId = "client id"), )
You will be required to specify device type when creating a Device object. A device object will be required for Automatically (RECORDING_METHOD_AUTOMATICALLY_RECORDED) or Actively (RECORDING_METHOD_ACTIVELY_RECORDED) recorded data.
Before
Device() // error: type not provided
After
Device(type = Device.Companion.TYPE_PHONE)
We believe these updates will significantly improve the quality of data within your applications and empower you to create more insightful user experiences. We encourage you to explore the Jetpack SDK Beta and review the updated Metadata page and familiarize yourself with these changes.
To enable richer, background-driven health and fitness experiences while maintaining user trust, Health Connect now features a dedicated background reads permission.
This permission allows your app to access Health Connect data while running in the background, provided the user grants explicit consent. Users retain full control, with the ability to manage or revoke this permission at any time via Health Connect settings.
Let your app read health data even in the background with the new Background Reads permission. Declare the following permission in your manifest file:
<application>
<uses-permission android:name="android.permission.health.READ_HEALTH_DATA_IN_BACKGROUND" />
...
</application>
Use the Feature Availability API to check if the user has the background read feature available, according to the version of Health Connect they have on their devices.
By default, when granted read permission, your app can access historical data from other apps for the preceding 30 days from the initial permission grant. To enable access to data beyond this 30-day window, Health Connect introduces the PERMISSION_READ_HEALTH_DATA_HISTORY permission. This allows your app to provide new users with a comprehensive overview of their health and wellness history.
Users are in control of their data with both background reads and history reads. Both capabilities require developers to declare the respective permissions, and users must grant the permission before developers can access their data. Even after granting permission, users have the option of revoking access at any time from Health Connect settings.
Health Connect now offers expanded data types, enabling developers to build richer user experiences and provide deeper insights. Check out the following new data types:
These new data types empower developers to create more connected and insightful health and fitness applications, providing users with a holistic view of their well-being.
To learn more about all new APIs and bug fixes, check out the full release notes.
Whether you are just getting started with Health Connect or are looking to implement the latest features, there are many ways to learn more and have your voice heard.
We can’t wait to see what you create!