> For the complete documentation index, see [llms.txt](https://docs.tryterra.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tryterra.co/help-center/help-topics/data-api-sdk/mobile-sdk-setup-permissions-and-crashes/health-connect-background-sync-not-firing.md).

# Why isn't Health Connect background sync firing?

Health Connect background sync behaves differently from Apple Health, so schedulerOn=true working immediately is not expected on first connection.

Health Connect background sync behaves differently from Apple Health, so `schedulerOn=true` working immediately is not expected on first connection.

How the scheduler works:

* **Health Connect only lets your app read in the background if the user grants its separate background-read permission.** The normal data permissions don't cover it.
* From Android SDK 1.7.0, connecting with `schedulerOn=true` requests that permission during the connection flow and schedules the recurring sync once it is granted. Use 1.7.3 or later: before that, the sync could be scheduled without the permission and then couldn't read anything.
* If the user declined, no background sync is scheduled. Call `enableBackgroundDelivery` to ask again, and `isBackgroundDeliveryAvailable` to check the current state. See [Background Delivery setup](https://docs.tryterra.co/unified-api/mobile-only-sources/android-kotlin).
* A new connection runs one initial sync. Manual getters such as `getActivity` read straight away, but only while your app is in the foreground.
* React Native and Flutter apps get the Android SDK through their package, so check which Android SDK version that package includes. `enableBackgroundDelivery` is only available in the native Android SDK.

Also **set both your app and the Health Connect app to Unrestricted battery usage**, since Samsung Device Care silently kills background tasks placed in sleeping apps.
