> For the complete documentation index, see [llms.txt](https://docs.thryve.health/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thryve.health/thryve-data-sources/health-connect.md).

# Health Connect

With Thryve you can easily integrate your application with Health Connect, Google's on-device health data platform for Android, via the ThryveHealthConnect module

<figure><img src="https://597945514-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXHZczPNWZCe1I09YetDl%2Fuploads%2FbWbYEpCWYKA2DeDBiXFv%2FScreenshot_20260902_121410.png?alt=media&amp;token=ba95618e-fa9a-4b60-9d45-0d3cc0df4be4" alt="" width="188"><figcaption></figcaption></figure>

`ThryveHealthConnect` handles the Health Connect permission flow so your app can easily read the  health data - steps, vitals, sleep, nutrition, and more - written by the user's other apps and devices, without having to integrate  each source separately.

{% hint style="warning" %}
`ThryveHealthConnect` uses [`androidx.health.connect:connect-client:1.2.0-alpha04`](https://developer.android.com/jetpack/androidx/releases/health-connect#1.2.0-alpha04), which requires a minimum `compileSdkVersion` of 37. Therefore, your application must use `compileSdkVersion 37` or higher to integrate and use `ThryveHealthConnect`.
{% endhint %}

{% hint style="info" %}
Health Connect is built into Android 14+ and available as a downloadable app on Android 9 (API 28) and above. The `ThryveHealthConnect` module itself supports Android 8 (API 26) and above, so your app can still run on older devices - Health Connect features simply won't be available there. See Setup Thryve SDK → Android for project configuration and required manifest permissions.
{% endhint %}

### Data availability

Health Connect only exposes data that has already been written to it by another app on the user's device (e.g. Samsung Health, Fitbit, Oura, Google Fit-successor apps). If no source app is writing a given data type to Health Connect, Thryve will not receive it either - direct device/sensor access is not possible through this module.

### Capabilities

* **Lifecycle & permissions:** Connects and disconnects via `start` / `stop`, checks availability and active state, requests and tracks Health Connect read permissions, and supports optional features like read-history and background read.
* **Incremental sync** : `synchronize` function uses Health Connect change tokens to pull new/updated records since the last sync and upload them to the Thryve backend.
* **Background sync:** Optional WorkManager-based background sync that runs periodic health data sync when enabled in config.
* **Historical backfill** : `backfillDaily` aggregates daily metrics (steps, calories, distance, heart rate, sleep, etc.) over a date range; `backfillEpoch` reads raw epoch records over a date range (up to 30 days).
* **Data types, configuration & provider support:** Maps 40+ Health Connect data types into Thryve’s standardised format. Configure data types, the Health Connect provider package name, background sync, and read-history access.
* **Observability:** OpenTelemetry-style spans for sync, backfill, permission checks, reads, and uploads to aid debugging and monitoring.

{% hint style="warning" %}
Health Connect determines which data is returned based on the user’s configured **data source/app priority**. When multiple apps or devices provide overlapping data, the prioritized source may determine which records are included in aggregated Health Connect results. As a result, the data available to the Thryve SDK depends on the data Health Connect makes available after applying these source-priority rules.

When validating missing or unexpected data, also verify the user’s **Health Connect data source priority settings**.
{% endhint %}

### Supported Data Types

The `ThryveHealthConnect` module supports over 40 Health Connect record types. We map these records to Thryve's standard data types. See the table below for the [full list](https://airtable.com/appUsNn6CVszlBjfw/shroLjZ7pigt4oV7j/tblUI4OiE28Soe8DR) of supported data types.

### How to integrate Thryve SDK Health Connect module

Follow [these instructions](/connect-data-sources.md) to integrate and connect to Health Connect


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.thryve.health/thryve-data-sources/health-connect.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
