periodicSync

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

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 SyncJobStatus

Parameters

periodicSyncConfiguration

configuration to determine the sync frequency and retry mechanism

Sources

androidJvm source
Link copied to clipboard