Health Connect sync frequency and background reads
Health Connect cannot notify your app of new data, so sync frequency is something you schedule: on foreground, or periodically in the background once the user grants the background read permission. HC Sync's Android SDK schedules an hourly WorkManager job; it is free for 5 synced users in public beta.
Last updated: 2026-11-07. Google behaviour quoted from the Android developer documentation, checked 2026-11-07.
Key facts (as of 2026-11)
- Google: apps can read Health Connect data only while in the foreground, unless the user grants the background read permission.
- Background permission: android.permission.health.READ_HEALTH_DATA_IN_BACKGROUND, with a feature check before scheduling work.
- Google's example schedules a WorkManager periodic job every 1 hour. ReadRecordsRequest page size defaults to 1000.
- An unused changes token expires within 30 days.
- HC Sync SDK 0.3.0: periodic sync about every 1 hour (the hours argument is configurable), network required, exponential backoff from 15 minutes.
How often does Health Connect data update?
That depends on the source apps. Health Connect is a store that other apps write into. Google also notes that on-device step counting is batched and written no more frequently than once per minute. Your sync cannot be fresher than what phone apps have written, and your server cannot be fresher than your app's last upload.
Can you read in the background?
Google's documentation says "Apps can only read data from Health Connect while they are in the foreground." To read after the user or system moves the app to the background, request the background read permission and let the user grant it. If the user declines, Google says the app should keep running and do what it can with the permissions granted.
<uses-permission android:name="android.permission.health.READ_HEALTH_DATA_IN_BACKGROUND" />
How do you schedule background reads?
Google's example checks that the background read feature is available, then enqueues a PeriodicWorkRequest with WorkManager at a one-hour interval. Use unique periodic work so you do not stack duplicates. Android's WorkManager treats periodic intervals as a minimum and may run work later, so background sync is not a real-time channel.
What does HC Sync do?
HcSync.start schedules a WorkManager periodic job, about hourly by default, that needs a network connection and retries with exponential backoff starting at 15 minutes. The worker retries network errors, server 5xx and 429 responses. It stops with a failure for permission, availability, authentication and plan errors, because retrying would not help. Without the background permission the SDK reports BackgroundNotAllowed, and you can still call syncNow while your app is open.
HcSync.syncOnAppStart(application, minIntervalMinutes = 15) HcSync.start(context) // hourly background sync val state = HcSync.syncNow(context) // foreground, on demand
Each pass uses Health Connect changes tokens, so after the first backfill it uploads only changes and deletions. Google advises separate tokens per data type so one revoked permission does not break the rest, and the SDK keeps tokens per type. On an expired token it re-reads the backfill window.
How do you avoid rate limits?
Google recommends aggregation for totals such as steps, which handles duplicate sources and lessens the chance of rate limiting, and says to catch quota errors and back off. Page with pageToken instead of repeating large reads, and avoid syncing every few minutes. For most backends hourly is plenty; if you need a fresh value for one screen, call syncNow when the user opens it.
What should you tell your users?
- Data arrives when the phone is online and the OS runs the job, not instantly.
- Battery optimisation settings on some phones can delay background work.
- Background access is optional and can be revoked in Health Connect.
- Your server sees a user's last upload time in GET /v1/users.
Official sources
- Android Developers: Sync data with Health Connect (changes tokens, foreground and background reads)
- Android Developers: Read Health Connect data (read limits, history, background reads)
Common questions
How often can a Health Connect app sync?
There is no push notification. Apps read in the foreground, or periodically in the background with the background read permission; Google’s example uses a one-hour WorkManager job.
Can Health Connect be read in the background?
Yes, but only if the app holds the background read permission, android.permission.health.READ_HEALTH_DATA_IN_BACKGROUND, which the user must grant.
How often does HC Sync sync?
The Android SDK runs a WorkManager job about every hour by default, plus an optional debounced sync when the app starts. It needs a network connection.
Is HC Sync real time?
No. Freshness depends on source apps writing to Health Connect and on the phone running the next upload.
Health Connect historical data · Health Connect REST API · Kotlin Health Connect sync · Samsung Health API · HC Sync documentation