# RemoteWorkContinuation

Artifact: [androidx.work:work-runtime](https://developer.android.com/jetpack/androidx/releases/work) [View Source](https://cs.android.com/search?q=file:androidx/work/multiprocess/RemoteWorkContinuation.java+class:androidx.work.multiprocess.RemoteWorkContinuation) Added in [2.5.0](https://developer.android.com/jetpack/androidx/releases/work#2.5.0)

*** ** * ** ***

<br />

```
abstract class RemoteWorkContinuation
```

<br />

*** ** * ** ***

Provides a subset of `https://developer.android.com/reference/kotlin/androidx/work/WorkContinuation` APIs that are available for apps that use multiple processes.

## Summary

| ### Public functions |
|---|---|
| `java-static https://developer.android.com/reference/kotlin/androidx/work/multiprocess/RemoteWorkContinuation` | `https://developer.android.com/reference/kotlin/androidx/work/multiprocess/RemoteWorkContinuation#combine(java.util.List<androidx.work.multiprocess.RemoteWorkContinuation>)(continuations: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/work/multiprocess/RemoteWorkContinuation!>)` Combines multiple `https://developer.android.com/reference/kotlin/androidx/work/multiprocess/RemoteWorkContinuation`s as prerequisites for a new RemoteWorkContinuation to allow for complex chaining. |
| `abstract https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<https://developer.android.com/reference/java/lang/Void.html!>` | `https://developer.android.com/reference/kotlin/androidx/work/multiprocess/RemoteWorkContinuation#enqueue()()` Enqueues the instance of `https://developer.android.com/reference/kotlin/androidx/work/multiprocess/RemoteWorkContinuation` on the background thread. |
| `abstract https://developer.android.com/reference/kotlin/androidx/work/multiprocess/RemoteWorkContinuation` | `https://developer.android.com/reference/kotlin/androidx/work/multiprocess/RemoteWorkContinuation#then(java.util.List<androidx.work.OneTimeWorkRequest>)(work: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/work/OneTimeWorkRequest!>)` Adds new `https://developer.android.com/reference/kotlin/androidx/work/OneTimeWorkRequest` items that depend on the successful completion of all previously added `https://developer.android.com/reference/kotlin/androidx/work/OneTimeWorkRequest`s. |
| `https://developer.android.com/reference/kotlin/androidx/work/multiprocess/RemoteWorkContinuation` | `https://developer.android.com/reference/kotlin/androidx/work/multiprocess/RemoteWorkContinuation#then(androidx.work.OneTimeWorkRequest)(work: https://developer.android.com/reference/kotlin/androidx/work/OneTimeWorkRequest)` Adds new `https://developer.android.com/reference/kotlin/androidx/work/OneTimeWorkRequest` items that depend on the successful completion of all previously added `https://developer.android.com/reference/kotlin/androidx/work/OneTimeWorkRequest`s. |

## Public functions

### combine

Added in [2.5.0](https://developer.android.com/jetpack/androidx/releases/work#2.5.0)

```
java-static fun combine(continuations: (Mutable)List<RemoteWorkContinuation!>): RemoteWorkContinuation
```

Combines multiple `https://developer.android.com/reference/kotlin/androidx/work/multiprocess/RemoteWorkContinuation`s as prerequisites for a new RemoteWorkContinuation to allow for complex chaining.

| Parameters |
|---|---|
| `continuations: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/work/multiprocess/RemoteWorkContinuation!>` | One or more `https://developer.android.com/reference/kotlin/androidx/work/multiprocess/RemoteWorkContinuation`s that are prerequisites for the return value |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/work/multiprocess/RemoteWorkContinuation` | A `https://developer.android.com/reference/kotlin/androidx/work/multiprocess/RemoteWorkContinuation` that allows further chaining |

### enqueue

Added in [2.5.0](https://developer.android.com/jetpack/androidx/releases/work#2.5.0)

```
abstract fun enqueue(): ListenableFuture<Void!>
```

Enqueues the instance of `https://developer.android.com/reference/kotlin/androidx/work/multiprocess/RemoteWorkContinuation` on the background thread.

| Returns |
|---|---|
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<https://developer.android.com/reference/java/lang/Void.html!>` | An `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` that can be used to determine when the enqueue has completed |

### then

Added in [2.5.0](https://developer.android.com/jetpack/androidx/releases/work#2.5.0)

```
abstract fun then(work: (Mutable)List<OneTimeWorkRequest!>): RemoteWorkContinuation
```

Adds new `https://developer.android.com/reference/kotlin/androidx/work/OneTimeWorkRequest` items that depend on the successful completion of all previously added `https://developer.android.com/reference/kotlin/androidx/work/OneTimeWorkRequest`s.

| Parameters |
|---|---|
| `work: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/work/OneTimeWorkRequest!>` | One or more `https://developer.android.com/reference/kotlin/androidx/work/OneTimeWorkRequest` to add as dependents |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/work/multiprocess/RemoteWorkContinuation` | A `https://developer.android.com/reference/kotlin/androidx/work/multiprocess/RemoteWorkContinuation` that allows for further chaining of dependent `https://developer.android.com/reference/kotlin/androidx/work/OneTimeWorkRequest`s |

### then

Added in [2.5.0](https://developer.android.com/jetpack/androidx/releases/work#2.5.0)

```
fun then(work: OneTimeWorkRequest): RemoteWorkContinuation
```

Adds new `https://developer.android.com/reference/kotlin/androidx/work/OneTimeWorkRequest` items that depend on the successful completion of all previously added `https://developer.android.com/reference/kotlin/androidx/work/OneTimeWorkRequest`s.

| Parameters |
|---|---|
| `work: https://developer.android.com/reference/kotlin/androidx/work/OneTimeWorkRequest` | One or more `https://developer.android.com/reference/kotlin/androidx/work/OneTimeWorkRequest`s to add as dependents |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/work/multiprocess/RemoteWorkContinuation` | A `https://developer.android.com/reference/kotlin/androidx/work/multiprocess/RemoteWorkContinuation` that allows for further chaining of dependent `https://developer.android.com/reference/kotlin/androidx/work/OneTimeWorkRequest`s |