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.
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:
1
Set battery usage to Unrestricted.
2
Remove them from Sleeping and Deep sleeping apps.
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 for details.
Last updated
Was this helpful?