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()

Properties

Link copied to clipboard

Observable flow of global upload state across all modules.

Link copied to clipboard

Observable flow of individual operation updates for real-time UI feedback.

Functions

Link copied to clipboard

Get pending upload operations for a specific module.

Link copied to clipboard
fun getModuleUploadState(module: ZuperModule, moduleUid: String): Flow<ZyncUploadState>

Get reactive upload state for a specific module.

Link copied to clipboard

Get detailed information about all pending upload operations.