Zync Data Manager
class ZyncDataManager
Interface for monitoring data synchronization operations in the Zync SDK.
Provides visibility into upload operations with reactive streams for building responsive UIs. Monitor sync progress globally or for specific modules (Jobs, Notes, Attachments) with real-time updates.
Usage Examples
// Monitor global sync status
zync.dataManager.globalUploadState.collect { state ->
when (state) {
is ZyncUploadState.Idle -> showIdle()
is ZyncUploadState.Uploading -> showProgress(state.pendingUploadCount)
is ZyncUploadState.WaitingForNetwork -> showOffline()
is ZyncUploadState.NetworkError -> showNetworkError()
is ZyncUploadState.Error -> showError()
is ZyncUploadState.Completed -> showCompleted()
}
}
// Monitor module-specific status
zync.dataManager.getModuleUploadState(ZuperModule.JOB, jobId).collect { state ->
updateJobStatus(state)
}
// Get detailed pending operations
val pending = zync.dataManager.getPendingUploads()Content copied to clipboard
Properties
Functions
Link copied to clipboard
suspend fun getModulePendingUploads(module: ZuperModule, moduleUid: String): List<ZyncPendingUpload>
Get pending upload operations for a specific module.
Link copied to clipboard
Get reactive upload state for a specific module.
Link copied to clipboard
Get detailed information about all pending upload operations.