RemoteWorkContinuation
public abstract class RemoteWorkContinuation
Provides a subset of androidx.work.WorkContinuation
APIs that are available for apps that use multiple processes.
Summary
Public methods |
|
---|---|
static @NonNull RemoteWorkContinuation |
combine(@NonNull List<RemoteWorkContinuation> continuations) Combines multiple |
abstract @NonNull ListenableFuture<Void> |
enqueue() Enqueues the instance of |
abstract @NonNull RemoteWorkContinuation |
then(@NonNull List<OneTimeWorkRequest> work) Adds new |
final @NonNull RemoteWorkContinuation |
then(@NonNull OneTimeWorkRequest work) Adds new |
Public methods
combine
public static @NonNull RemoteWorkContinuation combine(@NonNull List<RemoteWorkContinuation> continuations)
Combines multiple RemoteWorkContinuation
s as prerequisites for a new RemoteWorkContinuation to allow for complex chaining.
Parameters | |
---|---|
@NonNull List<RemoteWorkContinuation> continuations |
One or more |
Returns | |
---|---|
@NonNull RemoteWorkContinuation |
A |
enqueue
public abstract @NonNull ListenableFuture<Void> enqueue()
Enqueues the instance of RemoteWorkContinuation
on the background thread.
Returns | |
---|---|
@NonNull ListenableFuture<Void> |
An |
then
public abstract @NonNull RemoteWorkContinuation then(@NonNull List<OneTimeWorkRequest> work)
Adds new OneTimeWorkRequest
items that depend on the successful completion of all previously added OneTimeWorkRequest
s.
Parameters | |
---|---|
@NonNull List<OneTimeWorkRequest> work |
One or more |
Returns | |
---|---|
@NonNull RemoteWorkContinuation |
A |
then
public final @NonNull RemoteWorkContinuation then(@NonNull OneTimeWorkRequest work)
Adds new OneTimeWorkRequest
items that depend on the successful completion of all previously added OneTimeWorkRequest
s.
Parameters | |
---|---|
@NonNull OneTimeWorkRequest work |
One or more |
Returns | |
---|---|
@NonNull RemoteWorkContinuation |
A |