Android Dev Summit, October 23-24: two days of technical content, directly from the Android team. Sign-up for livestream updates.

ProgressUpdater

interface ProgressUpdater
androidx.work.ProgressUpdater

Updates progress for a androidx.work.ListenableWorker.

Summary

Public methods

abstract ListenableFuture<Void!>
updateProgress(@NonNull context: Context, @NonNull id: UUID, @NonNull data: Data)

Public methods

updateProgress

@NonNull abstract fun updateProgress(@NonNull context: Context, @NonNull id: UUID, @NonNull data: Data): ListenableFuture<Void!>
Parameters
context Context: The application Context.
id Context: The UUID identifying the ListenableWorker
data Context: The progress Data
Return
ListenableFuture<Void!>: The ListenableFuture which resolves after progress is persisted.

Cancelling this ListenableFuture does not cancel the writes to the database to update progress.