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

RemoteWorkContinuation

public abstract class RemoteWorkContinuation
extends Object

java.lang.Object
   ↳ androidx.work.multiprocess.RemoteWorkContinuation


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

Summary

Public methods

static RemoteWorkContinuation combine(List<RemoteWorkContinuation> continuations)

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

abstract ListenableFuture<Void> enqueue()

Enqueues the instance of RemoteWorkContinuation on the background thread.

final RemoteWorkContinuation then(OneTimeWorkRequest work)

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

abstract RemoteWorkContinuation then(List<OneTimeWorkRequest> work)

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

Inherited methods

Public methods

combine

public static RemoteWorkContinuation combine (List<RemoteWorkContinuation> continuations)

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

Parameters
continuations List: One or more RemoteWorkContinuations that are prerequisites for the return value

Returns
RemoteWorkContinuation A RemoteWorkContinuation that allows further chaining

enqueue

public abstract ListenableFuture<Void> enqueue ()

Enqueues the instance of RemoteWorkContinuation on the background thread.

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

then

public final RemoteWorkContinuation then (OneTimeWorkRequest work)

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

Returns
RemoteWorkContinuation A RemoteWorkContinuation that allows for further chaining of dependent OneTimeWorkRequests

then

public abstract RemoteWorkContinuation then (List<OneTimeWorkRequest> work)

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

Parameters
work List: One or more OneTimeWorkRequest to add as dependents

Returns
RemoteWorkContinuation A RemoteWorkContinuation that allows for further chaining of dependent OneTimeWorkRequests