Google 致力于为黑人社区推动种族平等。查看具体举措

ProgressUpdater

public interface ProgressUpdater

androidx.work.ProgressUpdater


Updates progress for a ListenableWorker.

Summary

Public methods

abstract ListenableFuture<Void> updateProgress(Context context, UUID id, Data data)

Public methods

updateProgress

public abstract ListenableFuture<Void> updateProgress (Context context, 
                UUID id, 
                Data data)

Parameters
context Context: The application Context.

id UUID: The UUID identifying the ListenableWorker

data Data: The progress Data

Returns
ListenableFuture<Void> The ListenableFuture which resolves after progress is persisted.

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