Sync

object Sync(source)

Enqueues unique one-time background sync work through WorkManager.

SyncWorker collects the repository's push-then-pull Flow. Requests use ExistingWorkPolicy.KEEP; a request ignored while unfinished work exists does not schedule another pass. No periodic work is configured.

The request requires a connected network and asks for expedited execution, with fallback to ordinary work when quota is unavailable. Execution timing is controlled by WorkManager.

Functions

Link copied to clipboard
fun initialize(context: Context)

Requests sync without awaiting enqueue completion or remote persistence.