lightbulb_outline Help shape the future of the Google Play Console, Android Studio, and Firebase. Start survey

SynchronousWorkContinuation

public interface SynchronousWorkContinuation

androidx.work.SynchronousWorkContinuation


Blocking methods for WorkContinuation operations. These methods are expected to be called from a background thread.

Summary

Public methods

abstract void enqueueSync()

Enqueues the instance of WorkContinuation in a synchronous fashion.

abstract List<WorkStatus> getStatusesSync()

Returns a List of WorkStatus that provides information about work, their progress, and any resulting output in the WorkContinuation.

Public methods

enqueueSync

public abstract void enqueueSync ()

Enqueues the instance of WorkContinuation in a synchronous fashion. This method is expected to be called from a background thread and, upon successful execution, you can rely on that the work has been enqueued.

getStatusesSync

public abstract List<WorkStatus> getStatusesSync ()

Returns a List of WorkStatus that provides information about work, their progress, and any resulting output in the WorkContinuation.

Returns
List<WorkStatus> A List of WorkStatuses