> 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/no-data/webhooks-background-delivery-stopping/samsung-background-battery-sync-loss.md).

# Why do Samsung users lose sync after the app sits idle?

On Samsung devices, both Health Connect and your app must stay alive in the background for sync to continue. Samsung's Device Care battery optimisation aggressively sleeps apps overnight, which silently stops sync.

**Have users adjust two battery settings** for both your app and Health Connect:

{% stepper %}
{% step %}
Set battery usage to **Unrestricted**.
{% endstep %}

{% step %}
Remove them from **Sleeping** and **Deep sleeping** apps.
{% endstep %}
{% endstepper %}

On the code side, call `initTerra()` each time the app returns to the foreground. This re-enqueues the one-time background sync worker if the process was killed. See the [Android SDK reference](https://docs.tryterra.co/reference/health-and-fitness-api/sdk-references/android-kotlin) for details.
