Health Connect

  
Allows developers to read or write user's health and fitness records.
Latest Update Stable Release Release Candidate Beta Release Alpha Release
September 21, 2022 - - - 1.0.0-alpha05

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.0.0-alpha05"
}

Kotlin

dependencies {
    // Use to implement health connects
    implementation("androidx.health.connect:connect-client:1.0.0-alpha05")
}

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.

Create a new issue

See the Issue Tracker documentation for more information.

Version 1.0

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.id and used the terminology recordId consistently throughout related CRUD APIs. (I3d1d2)
  • Made PermissionController.createRequestPermissionActivityContract a static method instead of an instance method. Renamed to PermissionController.createRequestPermissionResultContract. (Icd2fe)
  • Added BloodGlucose unit type for BloodGlucoseRecord (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

As of 1.0.0-alpha04, Health Connect has moved from the previous group of androidx.health into androidx.health.connect. For previous versions of Health Connect, please visit the androidx.health page.

androidx.health.connect:connect-client:1.0.0-alpha04 is released. Version 1.0.0-alpha04 contains these commits.

New Features

  • Included optional debug logs builtin for API calls (link)

API Changes

  • Renamed Metadata clientId to clientRecordId, clientVersion to clientRecordVersion. (link)
  • Made Metadata uid more friendly to readers, no longer nullable. (link)
  • Added pounds to Mass unit (link)
  • Renamed DeletionChange.deleteUid to 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)