periodicSync

@ExperimentalCoroutinesApi
inline fun <W : FhirSyncWorker> periodicSync(context: Context, periodicSyncConfiguration: PeriodicSyncConfiguration): Flow<PeriodicSyncJobStatus>

Starts a periodic sync job based on FhirSyncWorker.

Use the returned Flow to get updates of the sync job. Alternatively, use getWorkerInfo with the same FhirSyncWorker to retrieve the status of the job.

Return

a Flow of PeriodicSyncJobStatus

Parameters

periodicSyncConfiguration

configuration to determine the sync frequency and retry mechanism