Health Connect
| Latest Update | Stable Release | Release Candidate | Beta Release | Alpha Release |
|---|---|---|---|---|
| October 8, 2025 | 1.1.0 | - | - | 1.2.0-alpha02 |
Requesting access to data types
To help us strengthen user privacy and security, developers integrating with Health Connect must declare read and/or write access for the data types that their apps use. Developers must include valid use cases for the data types they use based on the app's purpose. For more information, visit Provide information for the Health apps declaration form and Health Connect by Android Permissions.
Declaring dependencies
To add a dependency on health, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.
Add the dependencies for the artifacts you need in the build.gradle file for
your app or module:
Groovy
dependencies { // Use to implement health connects implementation "androidx.health.connect:connect-client:1.2.0-alpha02" }
Kotlin
dependencies { // Use to implement health connects implementation("androidx.health.connect:connect-client:1.2.0-alpha02") }
For more information about dependencies, see Add build dependencies.
Feedback
Your feedback helps make Jetpack better. Let us know if you discover new issues or have ideas for improving this library. Please take a look at the existing issues in this library before you create a new one. You can add your vote to an existing issue by clicking the star button.
See the Issue Tracker documentation for more information.
Health Connect Testing Version 1.0
Version 1.0.0-alpha03
April 9, 2025
androidx.health.connect:connect-testing:1.0.0-alpha03 is released. Version 1.0.0-alpha03 contains these commits.
Bug Fixes
Metadata.populatedWithTestValueswill preserve original values if an override is not provided. (I3ee27)- Only update changelogs when deleting existing records. (I74a16)
Version 1.0.0-alpha02
February 26, 2025
androidx.health.connect:connect-testing:1.0.0-alpha02 is released. Version 1.0.0-alpha02 contains these commits.
API Changes
- Introduce
MetadataTestHelper#populatedWithTestValuesto use in tests after metadata changes introduced inandroidx.health.connect:connect-client:1.1.0-alpha12(I1f7f1) - Removes
ExperimentalTestingApiannotation inconnect-testing(I97a57) - Adds full stubs for records and changes in
FakeHealthConnectClient(I15a4c)
Version 1.0.0-alpha01
September 4, 2024
androidx.health.connect:connect-testing:1.0.0-alpha01 is released. Version 1.0.0-alpha01 contains these commits.
New Features
The Health Connect Testing library simplifies the creation of automated tests. You can use this library to verify the behavior of your application and validate that it responds correctly to uncommon cases, which are hard to test manually.
You can use the library to create local unit tests, which typically verify the behavior of the classes in your app that interact with the Health Connect client.
The entry point to the library is the FakeHealthConnectClient class, which you use in tests to replace the HealthConnectClient. It has the following features:
- An in-memory representation of records, so you can insert, remove, delete and read them
- Generation of change tokens and change tracking
- Pagination for records and changes
- Aggregation responses are supported with stubs
- Allows any function to throw exceptions
- A
FakePermissionControllerthat can be used to emulate permissions checks
API Changes
Version 1.2
Version 1.2.0-alpha02
October 08, 2025
androidx.health.connect:connect-client:1.2.0-alpha02, androidx.health.connect:connect-client-external-protobuf:1.2.0-alpha02, and androidx.health.connect:connect-client-proto:1.2.0-alpha02 are released. Version 1.2.0-alpha02 contains these commits.
API Changes
- Adds new Device Type enums (I86ce3)
Version 1.2.0-alpha01
July 30, 2025
androidx.health.connect:connect-client:1.2.0-alpha01, androidx.health.connect:connect-client-external-protobuf:1.2.0-alpha01, and androidx.health.connect:connect-client-proto:1.2.0-alpha01 are released. Version 1.2.0-alpha01 contains these commits.
New Features
- Add backwards compatibility support for Skin Temperature (d04b1df)
- Add backwards compatibility support for Mindfulness (444eda2)
- Add Activity Intensity API for Android 14+ (d10f67b)
Version 1.1
Version 1.1.0
October 08, 2025
androidx.health.connect:connect-client:1.1.0, androidx.health.connect:connect-client-external-protobuf:1.1.0, and androidx.health.connect:connect-client-proto:1.1.0 have been promoted to its first stable release with no changes since its previous RC release.
Version 1.1.0-rc03
July 16, 2025
androidx.health.connect:connect-client:1.1.0-rc03, androidx.health.connect:connect-client-external-protobuf:1.1.0-rc03, and androidx.health.connect:connect-client-proto:1.1.0-rc03 are released. Version 1.1.0-rc03 contains these commits.
Bug Fixes
- Fixed
IllegalArgumentExceptionfor aggregations over a DST boundary. (Ic9e4f)
Version 1.1.0-rc02
June 4, 2025
androidx.health.connect:connect-client:1.1.0-rc02, androidx.health.connect:connect-client-external-protobuf:1.1.0-rc02, and androidx.health.connect:connect-client-proto:1.1.0-rc02 are released. Version 1.1.0-rc02 contains these commits.
Bug Fixes
- Added support for missing device types (Ied486)
- Updated mindfulness sessions permission string (I13ab5)
Version 1.1.0-rc01
April 23, 2025
androidx.health.connect:connect-client:1.1.0-rc01, androidx.health.connect:connect-client-external-protobuf:1.1.0-rc01, and androidx.health.connect:connect-client-proto:1.1.0-rc01 are released. Version 1.1.0-rc01 contains these commits.
API Changes
- Added mindfulness feature availability flag for developers. (I936a8)
Version 1.1.0-beta02
April 9, 2025
androidx.health.connect:connect-client:1.1.0-beta02, androidx.health.connect:connect-client-external-protobuf:1.1.0-beta02, and androidx.health.connect:connect-client-proto:1.1.0-beta02 are released. Version 1.1.0-beta02 contains these commits.
New Features
- Added experimental Personal Health Record (PHR) APIs for reading and writing medical data, based on the Fast Healthcare Interoperability Resources (FHIR®) format. PHR APIs include:
- A
FEATURE_PERSONAL_HEALTH_RECORDconstant to check if PHR is available through the feature availability API. - APIs for applications writing medical data sources and records.
- APIs for applications reading medical data sources and records based on user-granted permissions.
- A
- Added experimental Mindfulness Session Record APIs (I51c13), including:
- APIs for applications writing mindfulness session data.
- APIs for applications reading mindfulness session data based on user-granted permissions.
Bug Fixes
- For Android U and higher, Jetpack's validation for
ElevationGainedRecord,FloorsClimbedRecord,HeartRateVariabilityRmssdRecord,HeightRecord,HydrationRecord,LeanBodyMassRecord,NutritionRecord,OxygenSaturationRecord,RespiratoryRateRecord,RestingHeartRateRecord,StepsRecord,TotalCaloriesBurnedRecord,Vo2MaxRecord,WeightRecord, andWheelchairPushesRecordvalues has been replaced with the platform's validation. (I0f40d)
Version 1.1.0-beta01
March 12, 2025
androidx.health.connect:connect-client:1.1.0-beta01, androidx.health.connect:connect-client-external-protobuf:1.1.0-beta01, and androidx.health.connect:connect-client-proto:1.1.0-beta01 are released. Version 1.1.0-beta01 contains these commits.
Bug Fixes
- Enable calculation for all aggregation types across all android versions. (I8edf)
Version 1.1.0-alpha12
February 26, 2025
androidx.health.connect:connect-client:1.1.0-alpha12, androidx.health.connect:connect-client-external-protobuf:1.1.0-alpha12, and androidx.health.connect:connect-client-proto:1.1.0-alpha12 are released. Version 1.1.0-alpha12 contains these commits.
API Changes
- Make Metadata constructor internal (I1fb8f
- Removed experimental annotation for feature availability API. (I5b54f)
- Introduce Metadata factory methods (I8418b)
- Make recording method mandatory when creating Metadata objects (I3a13e)
- Make device type mandatory when creating Device objects (Ibc325)
Bug Fixes
- Fixed missing descriptions from planned exercise steps and blocks. (I84039)
- Update java doc for blood pressure value limits. (I8d3d4)
- For Android U and higher, Jetpack's validation for blood pressure record values has been replaced with the platform's validation. (I08bf5)
- Add contributing data origins for bucketed results on Android U and above. (Ie7651)
Version 1.1.0-alpha11
January 15, 2025
androidx.health.connect:connect-client:1.1.0-alpha11, androidx.health.connect:connect-client-external-protobuf:1.1.0-alpha11, and androidx.health.connect:connect-client-proto:1.1.0-alpha11 are released. Version 1.1.0-alpha11 contains these commits.
New Features
- Updated background and history read permissions to support Android 13 and below.
API Changes
- Added inline reified overloads for
HealthPermission.getReadPermissionandHealthPermission.getWritePermission(I59a2e)
Bug Fixes
- Remove legacy permission methods (Ifd080)
- This library now uses JSpecify nullness annotations, which are type-use. Kotlin developers should use the following compiler argument to enforce correct usage:
-Xjspecify-annotations=strict(this is the default starting with version 2.1.0 of the Kotlin compiler). (Iaf73a, b/326456246) - Fixed documentation for
HealthPermission.READ_HEALTH_DATA_HISTORY, specifically by pointing out that reads without this permission only fail when attempting to read a single data point. (Id5b5a)
Version 1.1.0-alpha10
October 16, 2024
androidx.health.connect:connect-client:1.1.0-alpha10, androidx.health.connect:connect-client-external-protobuf:1.1.0-alpha10, and androidx.health.connect:connect-client-proto:1.1.0-alpha10 are released. Version 1.1.0-alpha10 contains these commits.
New Features
- Added
SkinTemperatureaggregation types. (Ibe123) - Added
FEATURE_PLANNED_EXERCISEconstant (Ie02a3) - Added History Reads permissions. (I5cf41)
- Added Training plans API (If5be1)
- Added
SkinTemperatureRecordAPI. (I5605d)
Security Fixes
- As of this change, androidx compiles against protobuf 4.28.2 in order to address CVE-2024-7254. Upgrade your dependency on
androidx.health:connect:connect-client-protoandandroidx.health:connect:connect-client-external-protobufto the latest 1.1.0-alpha10 to address the vulnerability risk.
Version 1.1.0-alpha09
September 18, 2024
androidx.health.connect:connect-client:1.1.0-alpha09, androidx.health.connect:connect-client-external-protobuf:1.1.0-alpha09, and androidx.health.connect:connect-client-proto:1.1.0-alpha09 are released. Version 1.1.0-alpha09 contains these commits.
New Features
Version 1.1.0-alpha08
September 4, 2024
androidx.health.connect:connect-client:1.1.0-alpha08, androidx.health.connect:connect-client-external-protobuf:1.1.0-alpha08, and androidx.health.connect:connect-client-proto:1.1.0-alpha08 are released. Version 1.1.0-alpha08 contains these commits.
API Changes
- Set default value for features variable in
HealthConnectClient. (I788dc) - Add an API to check feature availability. (Iedd43)
Bug Fixes
- Return
SDK_UNAVAILABLEinHealthConnectClient.getSdkStatus()whenHealthConnectManageris null in U+ 5802f - Add
toStringoverrides toRecordClassesaa5dc - Removed manual outlining of access to new platform APIs since this happens automatically via API modeling when using R8 with AGP 7.3 or later (e.g. R8 version 3.3) and for all builds when using AGP 8.1 or later (e.g. D8 version 8.1). Clients who are not using AGP are advised to update to D8 version 8.1 or later. See this article for more details. (If6b4c, b/345472586)
Version 1.1.0-alpha07
January 10, 2024
androidx.health.connect:connect-client:1.1.0-alpha07 is released. Version 1.1.0-alpha07 contains these commits.
API Changes
- Return
SDK_UNAVAILABLEwhen#getSdkStatusis called from a profile user context. (I91df3) - Remove
SleepStageRecord. (/If6ada)
Bug Fixes
- Throw
RemoteExceptioninstead ofIllegalStateExceptionon binding failures. (Id2233)
Version 1.1.0-alpha06
October 18, 2023
androidx.health.connect:connect-client:1.1.0-alpha06 is released. Version 1.1.0-alpha06 contains these commits.
API Changes
- Makes
recordingMethoddefinitions public. (I401fb)
Bug Fixes
- Add documentation to exercise route specifying that location should be before end time of the session. (0e51e6)
Version 1.1.0-alpha05
October 4, 2023
androidx.health.connect:connect-client:1.1.0-alpha05 is released. Version 1.1.0-alpha05 contains these commits.
API Changes
- Added intent that navigates to health connect data management screen. (Ibf591)
- Removed deprecated methods in
AggregationResult. (Idbda9) - Added convenience API for creating
ReadRecordsRequest, as well as deleting and reading records, with a reified record type. (If58a5)
Bug Fixes
- Fixed a bug in Android 14 where null nutrition fields were being returned as
Double.MIN_VALUE. (1aa1d1) - Fixed a bug in Android 14 where aggregation by Monthly/Yearly period was throwing an exception in the response due to buckets having the same start/end time. (281313)
Version 1.1.0-alpha04
September 6, 2023
androidx.health.connect:connect-client:1.1.0-alpha04 is released. Version 1.1.0-alpha04 contains these commits.
API Changes
- Java only: rename the
getHasMore()field onChangesResponsetohasMore(). (I80695) - Align
HealthPermissionsRequestContract#createIntentcheck across Android versions. The contract checks that all permissions are health-related permissions. (I143fc)
Bug Fixes
- Fix exception that is thrown when
ExerciseSessionRecordis created with anExerciseRoutecontaining empty list of location. (I45c16) - Update
SleepSessionRecorddocumentation and sample code for reading sleep sessions. (Idf0de)
Version 1.1.0-alpha03
July 26, 2023
androidx.health.connect:connect-client:1.1.0-alpha03 is released. Version 1.1.0-alpha03 contains these commits.
New Features
- API for reading and writing Exercise routes:
- Added
ExerciseRouteResulttoExerciseSessionRecord - Added
ExerciseRouteRequestContract
- Added
API Changes
- Added
ExerciseRouteResultand its subclasses:Data,NoDataandConsentRequiredStates. - Added
ExerciseRouteas a standalone class, which holds location data for the route. (I22eed) - Added
PERMISSION_WRITE_EXERCISE_ROUTE. (I92fc4) - Added
ExerciseRouteRequestContract, addedHealthPermissionsRequestContract. (Ief0e5)
Bug Fixes
- Fixed construction of Energy in kilojoules (Ie8791)
Version 1.1.0-alpha02
June 21, 2023
androidx.health.connect:connect-client:1.1.0-alpha02 is released. Version 1.1.0-alpha02 contains these commits.
Bug Fixes
- Fixed
HealthDataSdkServiceleak (Ia3ba5) - Always redirect to the right
HealthConnectClient when requesting permissions on Android U.(I6415a)
Version 1.1.0-alpha01
June 7, 2023
androidx.health.connect:connect-client:1.1.0-alpha01 is released. This version is developed in an internal branch.
New Features
- Support for the Android 14 framework version of Health Connect. This SDK is a prerequisite for Android 14. Apps will not be able to integrate with Health Connect on Android 14 without it.
- Added recording method to record metadata.
API Changes
- Session API changes:
- Added various sleep stages into
SleepSessionRecordand removedSleepStageRecord. - Added
ExerciseLapandExerciseSegmentintoExerciseSessionRecord.
- Added various sleep stages into
- Periodic and daily rate limits (including memory limits), for read, changelog, insertion and deletion operations.
- Added validation for all
NutritionRecordfields. - Added validation for
HeartRateVariabilityRmssdRecord. - Removed two deprecated APIs:
HealthConnectClient#isProviderAvailableandHealthConnectClient#isApiSupported.
Bug Fixes
- Fixed units equality for all unit types, equality no longer depends on type used for unit initialization. E.g. Mass.grams(1000) is now equal to Mass.kilograms(1).
Version 1.0
Version 1.0.0-alpha11
February 22, 2023
androidx.health.connect:connect-client:1.0.0-alpha11 is released. Version 1.0.0-alpha11 contains these commits.
API Changes
- Adding an intent to use for opening Health Connect. (Ic8055)
- Removing some exercise types. Use
EXERCISE_TYPE_STRENGTH_TRAINING,EXERCISE_TYPE_HIGH_INTENSITY_INTERVAL_TRAININGorEXERCISE_TYPE_CALISTHENICSin place of the removed types. (I7291c) - Adding new API
sdkStatus()that combines the two now deprecated APIsisSdkSupported()andisProviderAvailable(). (Iac89d) - Changing APIs that accept
providerPackageNameto accept a single string rather than a list. (I67e0f)
Version 1.0.0-alpha10
January 25, 2023
androidx.health.connect:connect-client:1.0.0-alpha10 is released. Version 1.0.0-alpha10 contains these commits.
API Changes
ExerciseEventRecord,ExerciseLapRecord,ExerciseRepititionRecordandSwimmingStrokesRecordare no longer supported asRecordTypes. They can no longer be written or read fromHealthConnect. Remove any reference to these data types from theHealthConnectintegration. (If7ca2)- Changes in permissions APIs to accept permissions in a new string based format. This change also requires changing permission declaration to the standard android permissions format. (Ib0a2f)
Version 1.0.0-alpha09
January 11, 2023
androidx.health.connect:connect-client:1.0.0-alpha09 is released. Version 1.0.0-alpha09 contains these commits.
New Features
- Added 2 new female health datatypes for Health Connect:
IntermenstrualBleedingRecord, andMenstruationPeriodRecord.MenstruationFlow.ENUMsare Light, Medium, Heavy, and Unknown.
API Changes
Version 1.0.0-alpha08
December 7, 2022
androidx.health.connect:connect-client:1.0.0-alpha08 is released. Version 1.0.0-alpha08 contains these commits.
API Changes
- Adds
BodyWaterMass,HeartRateVariabilityRmssdRecordas new supported Record Types. (Ifd58f) - Removes
HipCircumferenceRecord,WaistCircumferenceRecordas supportedRecordTypes. (I62fb9) - Changed
MenstruationFlowRecord.flowfromstringdeftointdefs. (I0369f) - Changed enum-like Record fields with
StringstoIntegersfor better performance. (I3b295) - Changed
ExerciseSession,ExerciseRepetitions,SleepStageenum-like fields from string to integer types. (Id32a9) - Renamed
ExerciseSessionRecord.ACTIVE_TIME_TOTAL->EXERCISE_DURATION_TOTAL. (I5d7bd) - Adds "Unusual" to
CervicalMucusenums. Rename "Clear" to "Eggwhite" for more specificity. ChangedCervicalMucus#appearanceand #sensation fromStringDefsto IntDefs. (I3ac51) StringDefofDeviceTypesenum is now moved intoIntDefsunder Device. (I3abf3)- Adds
HealthConnectClient.isApiSupported(), which returns false on SDK versions with no compatible implementations. RenamedHealthConnectClient.isAvailable->isProviderAvailable. (I3674e)
Bug Fixes
- Disallow
HeartRate beatsPerMinutevalues less than 1 (I6052f) - Adding
@JvmDefaultWithCompatibilityannotation (I8f206)
Version 1.0.0-alpha07
October 24, 2022
androidx.health.connect:connect-client:1.0.0-alpha07 is released. Version 1.0.0-alpha07 contains these commits.
API Changes
- Record arguments without default values are placed before arguments with default values. For consistency,
InstantandZoneOffsetarguments are always placed at the very beginning. (Id618c) - Rename
HealthConnectClient.getOrCreate#packageNamestoproviderPackageNames. (Id81e4)
Bug Fixes
- Adds Record field value validations. Extremely wrong values will throw
IllegalArgumentExceptionswhen provided value is out of reasonable bounds. (Ie171d) - Validates record start time before end time where relevant. (I02460)
Version 1.0.0-alpha06
October 5, 2022
androidx.health.connect:connect-client:1.0.0-alpha06 is released. Version 1.0.0-alpha06 contains these commits.
Bug Fixes
- Improves service connection lifecycle. (If2bd5)
- Fix an NPE crash bug when exception raised in service connection. (I13546)
Version 1.0.0-alpha05
September 21, 2022
androidx.health.connect:connect-client:1.0.0-alpha05 is released. Version 1.0.0-alpha05 contains these commits.
API Changes
- Renamed
Metadata.uid->Metadata.idand used the terminologyrecordIdconsistently throughout related CRUD APIs. (I3d1d2) - Made
PermissionController.createRequestPermissionActivityContracta static method instead of an instance method. Renamed toPermissionController.createRequestPermissionResultContract. (Icd2fe) - Added
BloodGlucoseunit type forBloodGlucoseRecord(I97678) - Rename
MenstruationRecord->MenstruationFlowRecord. (I3b88e)
Bug Fixes
- Fix unintended behavior not propagating foreground stats from client process. (Ifb44c)
Version 1.0.0-alpha04
August 24, 2022
androidx.health.connect:connect-client:1.0.0-alpha04 is released. Version 1.0.0-alpha04 contains these commits.
Migration to `androidx.health.connect
As of 1.0.0-alpha04, androidx.health:health-connect-client was migrated to
androidx.health.connect:connect-client. For previous versions of Health
Connect, please visit the
androidx.health
page.
To migrate, simply change your dependency import from
androidx.health:health-connect-client:1.0.0-alpha03 to
androidx.health.connect:connect-client:1.0.0-alpha04.
New Features
- Included optional debug logs builtin for API calls (link)
API Changes
- Renamed Metadata
clientIdtoclientRecordId,clientVersiontoclientRecordVersion. (link) - Made Metadata uid more friendly to readers, no longer nullable. (link)
- Added pounds to Mass unit (link)
- Renamed
DeletionChange.deleteUidto uid (link) - Rename Permission -> HealthPermission. This avoids ambiguity with Android Framework permissions. (link)
Bug Fixes
- Fixed regression issues with incorrect calories unit with Energy (link)
- Fixed regression issue with aggregation for few record types (link)