RemoteWorkContinuation


abstract class RemoteWorkContinuation


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

Summary

Public functions

java-static 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.

abstract RemoteWorkContinuation

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

RemoteWorkContinuation

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

Public functions

combine

Added in 2.5.0
java-static fun combine(continuations: (Mutable)List<RemoteWorkContinuation!>): RemoteWorkContinuation

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

Parameters
continuations: (Mutable)List<RemoteWorkContinuation!>

One or more RemoteWorkContinuations that are prerequisites for the return value

Returns
RemoteWorkContinuation

A RemoteWorkContinuation that allows further chaining

enqueue

Added in 2.5.0
abstract fun enqueue(): ListenableFuture<Void!>

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

Added in 2.5.0
abstract fun then(work: (Mutable)List<OneTimeWorkRequest!>): RemoteWorkContinuation

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

Parameters
work: (Mutable)List<OneTimeWorkRequest!>

One or more OneTimeWorkRequest to add as dependents

Returns
RemoteWorkContinuation

A RemoteWorkContinuation that allows for further chaining of dependent OneTimeWorkRequests

then

Added in 2.5.0
fun then(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

Returns
RemoteWorkContinuation

A RemoteWorkContinuation that allows for further chaining of dependent OneTimeWorkRequests