Google is committed to advancing racial equity for Black communities. See how.

RemoteWorkContinuation

abstract class RemoteWorkContinuation
kotlin.Any
   ↳ androidx.work.multiprocess.RemoteWorkContinuation

Provides a subset of androidx.work.WorkContinuation APIs that are available for apps that use multiple processes.

Summary

Public methods
open static RemoteWorkContinuation
combine(@NonNull continuations: MutableList<RemoteWorkContinuation!>)

Combines multiple RemoteWorkContinuations as prerequisites for a new RemoteWorkContinuation to allow for complex chaining.

abstract ListenableFuture<Void!>

Enqueues the instance of RemoteWorkContinuation on the background thread.

RemoteWorkContinuation
then(@NonNull work: OneTimeWorkRequest)

Adds new OneTimeWorkRequest items that depend on the successful completion of all previously added OneTimeWorkRequests.

abstract RemoteWorkContinuation

Adds new OneTimeWorkRequest items that depend on the successful completion of all previously added OneTimeWorkRequests.

Public methods

combine

@NonNull open static fun combine(@NonNull continuations: MutableList<RemoteWorkContinuation!>): RemoteWorkContinuation

Combines multiple RemoteWorkContinuations as prerequisites for a new RemoteWorkContinuation to allow for complex chaining.

Parameters
continuations MutableList<RemoteWorkContinuation!>: One or more RemoteWorkContinuations that are prerequisites for the return value
Return
RemoteWorkContinuation A RemoteWorkContinuation that allows further chaining

enqueue

@NonNull abstract fun enqueue(): ListenableFuture<Void!>

Enqueues the instance of RemoteWorkContinuation on the background thread.

Return
ListenableFuture<Void!> An ListenableFuture that can be used to determine when the enqueue has completed

then

@NonNull fun then(@NonNull work: OneTimeWorkRequest): RemoteWorkContinuation

Adds new OneTimeWorkRequest items that depend on the successful completion of all previously added OneTimeWorkRequests.

Parameters
work OneTimeWorkRequest: One or more OneTimeWorkRequests to add as dependents
Return
RemoteWorkContinuation A RemoteWorkContinuation that allows for further chaining of dependent OneTimeWorkRequests

then

@NonNull abstract fun then(@NonNull work: MutableList<OneTimeWorkRequest!>): RemoteWorkContinuation

Adds new OneTimeWorkRequest items that depend on the successful completion of all previously added OneTimeWorkRequests.

Parameters
work MutableList<OneTimeWorkRequest!>: One or more OneTimeWorkRequest to add as dependents
Return
RemoteWorkContinuation A RemoteWorkContinuation that allows for further chaining of dependent OneTimeWorkRequests