ProgressUpdater


public interface ProgressUpdater


Updates progress for a androidx.work.ListenableWorker.

Summary

Public methods

abstract @NonNull ListenableFuture<Void>

Public methods

updateProgress

Added in 2.3.0
abstract @NonNull ListenableFuture<VoidupdateProgress(@NonNull Context context, @NonNull UUID id, @NonNull Data data)
Parameters
@NonNull Context context

The application Context.

@NonNull UUID id

The UUID identifying the ListenableWorker

@NonNull Data data

The progress Data

Returns
@NonNull ListenableFuture<Void>

The ListenableFuture which resolves after progress is persisted.

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