How to allow periodic SyncAdapter to run when app is in 'force stopped' state

92 views Asked by At

I have created a sample app here: https://github.com/lukewo/AndroidSyncApp

Is there a way to allow the SyncAdapter to run after the app has been put into a force stopped state or is this not possible due to the new limitations android has introduced?

Should I be using the WorkManager instead?

1

There are 1 answers

0
David Wasser On

If your app is in "force stopped" state, this implies that the user has manually "force stopped" the app. In this state, Android will not launch the app for any reason. Only the user can launch the app again (manually), returning it to to normal state.

Basically, the user is telling Android that he doesn't want your app running any more unless he explicitly launches it.