# RemoteWorkManager

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/RemoteWorkManager.java+class:androidx.work.multiprocess.RemoteWorkManager) Added in [2.5.0](https://developer.android.com/jetpack/androidx/releases/work#2.5.0)

*** ** * ** ***

<br />

```
public abstract class RemoteWorkManager
```

<br />

*** ** * ** ***

A subset of `https://developer.android.com/reference/androidx/work/WorkManager` APIs that are available for apps that use multiple processes.

## Summary

| ### Public methods |
|---|---|
| `abstract @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkContinuation` | `https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkManager#beginUniqueWork(java.lang.String,androidx.work.ExistingWorkPolicy,java.util.List<androidx.work.OneTimeWorkRequest>)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html uniqueWorkName, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/ExistingWorkPolicy existingWorkPolicy, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/work/OneTimeWorkRequest> work )` This method allows you to begin unique chains of work for situations where you only want one chain with a given name to be active at a time. |
| `final @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkContinuation` | `https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkManager#beginUniqueWork(java.lang.String,androidx.work.ExistingWorkPolicy,androidx.work.OneTimeWorkRequest)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html uniqueWorkName, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/ExistingWorkPolicy existingWorkPolicy, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/OneTimeWorkRequest work )` This method allows you to begin unique chains of work for situations where you only want one chain with a given name to be active at a time. |
| `abstract @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkContinuation` | `https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkManager#beginWith(java.util.List<androidx.work.OneTimeWorkRequest>)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/work/OneTimeWorkRequest> work)` Begins a chain with one or more `https://developer.android.com/reference/androidx/work/OneTimeWorkRequest`s, which can be enqueued together in the future using `https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkContinuation#enqueue()`. |
| `final @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkContinuation` | `https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkManager#beginWith(androidx.work.OneTimeWorkRequest)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/OneTimeWorkRequest work)` Begins a chain with one or more `https://developer.android.com/reference/androidx/work/OneTimeWorkRequest`s, which can be enqueued together in the future using `https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkContinuation#enqueue()`. |
| `abstract @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html 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/androidx/work/multiprocess/RemoteWorkManager#cancelAllWork()()` Cancels all unfinished work. |
| `abstract @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html 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/androidx/work/multiprocess/RemoteWorkManager#cancelAllWorkByTag(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html tag)` Cancels all unfinished work with the given tag. |
| `abstract @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html 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/androidx/work/multiprocess/RemoteWorkManager#cancelUniqueWork(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html uniqueWorkName)` Cancels all unfinished work in the work chain with the given name. |
| `abstract @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html 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/androidx/work/multiprocess/RemoteWorkManager#cancelWorkById(java.util.UUID)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/UUID.html id)` Cancels work with the given id if it isn't finished. |
| `abstract @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html 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/androidx/work/multiprocess/RemoteWorkManager#enqueue(androidx.work.WorkRequest)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/WorkRequest request)` Enqueues one item for background processing. |
| `abstract @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html 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/androidx/work/multiprocess/RemoteWorkManager#enqueue(java.util.List<androidx.work.WorkRequest>)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/work/WorkRequest> requests)` Enqueues one or more items for background processing. |
| `abstract @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html 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/androidx/work/multiprocess/RemoteWorkManager#enqueueUniquePeriodicWork(java.lang.String,androidx.work.ExistingPeriodicWorkPolicy,androidx.work.PeriodicWorkRequest)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html uniqueWorkName, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/ExistingPeriodicWorkPolicy existingPeriodicWorkPolicy, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/PeriodicWorkRequest periodicWork )` This method allows you to enqueue a uniquely-named `https://developer.android.com/reference/androidx/work/PeriodicWorkRequest`, where only one PeriodicWorkRequest of a particular name can be active at a time. |
| `abstract @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html 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/androidx/work/multiprocess/RemoteWorkManager#enqueueUniqueWork(java.lang.String,androidx.work.ExistingWorkPolicy,java.util.List<androidx.work.OneTimeWorkRequest>)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html uniqueWorkName, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/ExistingWorkPolicy existingWorkPolicy, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/work/OneTimeWorkRequest> work )` This method allows you to enqueue `work` requests to a uniquely-named `https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkContinuation`, where only one continuation of a particular name can be active at a time. |
| `final @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html 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/androidx/work/multiprocess/RemoteWorkManager#enqueueUniqueWork(java.lang.String,androidx.work.ExistingWorkPolicy,androidx.work.OneTimeWorkRequest)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html uniqueWorkName, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/ExistingWorkPolicy existingWorkPolicy, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/OneTimeWorkRequest work )` This method allows you to enqueue `work` requests to a uniquely-named `https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkContinuation`, where only one continuation of a particular name can be active at a time. |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkManager` | `https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkManager#getInstance(android.content.Context)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Context.html context)` Gets the instance of `https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkManager` which provides a subset of `https://developer.android.com/reference/androidx/work/WorkManager` APIs that are safe to use for apps that use multiple processes. |
| `abstract @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/work/WorkInfo>>` | `https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkManager#getWorkInfos(androidx.work.WorkQuery)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/WorkQuery workQuery)` Gets the `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` of the `https://developer.android.com/reference/java/util/List.html` of `https://developer.android.com/reference/androidx/work/WorkInfo` for all work referenced by the `https://developer.android.com/reference/androidx/work/WorkQuery` specification. |

## Public methods

### beginUniqueWork

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

```
public abstract @NonNull RemoteWorkContinuation beginUniqueWork(
    @NonNull String uniqueWorkName,
    @NonNull ExistingWorkPolicy existingWorkPolicy,
    @NonNull List<OneTimeWorkRequest> work
)
```

This method allows you to begin unique chains of work for situations where you only want one chain with a given name to be active at a time. For example, you may only want one sync operation to be active. If there is one pending, you can choose to let it run or replace it with your new work.

The `uniqueWorkName` uniquely identifies this set of work.

If this method determines that new work should be enqueued and run, all records of previous work with `uniqueWorkName` will be pruned. If this method determines that new work should NOT be run, then the entire chain will be considered a no-op.

If any work in the chain fails or is cancelled, all of its dependent work inherits that state and will never run. This is particularly important if you are using `APPEND` as your `https://developer.android.com/reference/androidx/work/ExistingWorkPolicy`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html uniqueWorkName` | A unique name which for this chain of work |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/ExistingWorkPolicy existingWorkPolicy` | An `https://developer.android.com/reference/androidx/work/ExistingWorkPolicy`; see below for more information |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/work/OneTimeWorkRequest> work` | One or more `https://developer.android.com/reference/androidx/work/OneTimeWorkRequest` to enqueue. `REPLACE` ensures that if there is pending work labelled with `uniqueWorkName`, it will be cancelled and the new work will run. `KEEP` will run the new sequence of work only if there is no pending work labelled with `uniqueWorkName`. `APPEND` will create a new sequence of work if there is no existing work with `uniqueWorkName`; otherwise, `work` will be added as a child of all leaf nodes labelled with `uniqueWorkName`. |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkContinuation` | A `https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkContinuation` that allows further chaining |

### beginUniqueWork

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

```
public final @NonNull RemoteWorkContinuation beginUniqueWork(
    @NonNull String uniqueWorkName,
    @NonNull ExistingWorkPolicy existingWorkPolicy,
    @NonNull OneTimeWorkRequest work
)
```

This method allows you to begin unique chains of work for situations where you only want one chain with a given name to be active at a time. For example, you may only want one sync operation to be active. If there is one pending, you can choose to let it run or replace it with your new work.

The `uniqueWorkName` uniquely identifies this set of work.

If this method determines that new work should be enqueued and run, all records of previous work with `uniqueWorkName` will be pruned. If this method determines that new work should NOT be run, then the entire chain will be considered a no-op.

If any work in the chain fails or is cancelled, all of its dependent work inherits that state and will never run. This is particularly important if you are using `APPEND` as your `https://developer.android.com/reference/androidx/work/ExistingWorkPolicy`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html uniqueWorkName` | A unique name which for this chain of work |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/ExistingWorkPolicy existingWorkPolicy` | An `https://developer.android.com/reference/androidx/work/ExistingWorkPolicy` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/OneTimeWorkRequest work` | The `https://developer.android.com/reference/androidx/work/OneTimeWorkRequest` to enqueue. `REPLACE` ensures that if there is pending work labelled with `uniqueWorkName`, it will be cancelled and the new work will run. `KEEP` will run the new sequence of work only if there is no pending work labelled with `uniqueWorkName`. `APPEND` will create a new sequence of work if there is no existing work with `uniqueWorkName`; otherwise, `work` will be added as a child of all leaf nodes labelled with `uniqueWorkName`. |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkContinuation` | A `https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkContinuation` that allows further chaining |

### beginWith

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

```
public abstract @NonNull RemoteWorkContinuation beginWith(@NonNull List<OneTimeWorkRequest> work)
```

Begins a chain with one or more `https://developer.android.com/reference/androidx/work/OneTimeWorkRequest`s, which can be enqueued together in the future using `https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkContinuation#enqueue()`.

If any work in the chain fails or is cancelled, all of its dependent work inherits that state and will never run.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/work/OneTimeWorkRequest> work` | One or more `https://developer.android.com/reference/androidx/work/OneTimeWorkRequest` to start a chain of work |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkContinuation` | A `https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkContinuation` that allows for further chaining of dependent `https://developer.android.com/reference/androidx/work/OneTimeWorkRequest` |

### beginWith

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

```
public final @NonNull RemoteWorkContinuation beginWith(@NonNull OneTimeWorkRequest work)
```

Begins a chain with one or more `https://developer.android.com/reference/androidx/work/OneTimeWorkRequest`s, which can be enqueued together in the future using `https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkContinuation#enqueue()`.

If any work in the chain fails or is cancelled, all of its dependent work inherits that state and will never run.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/OneTimeWorkRequest work` | One or more `https://developer.android.com/reference/androidx/work/OneTimeWorkRequest` to start a chain of work |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkContinuation` | A `https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkContinuation` that allows for further chaining of dependent `https://developer.android.com/reference/androidx/work/OneTimeWorkRequest` |

### cancelAllWork

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

```
public abstract @NonNull ListenableFuture<Void> cancelAllWork()
```

Cancels all unfinished work. **Use this method with extreme caution!** By invoking it, you will potentially affect other modules or libraries in your codebase. It is strongly recommended that you use one of the other cancellation methods at your disposal.

Upon cancellation, `https://developer.android.com/reference/androidx/work/ListenableWorker#onStopped()` will be invoked for any affected workers.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<https://developer.android.com/reference/java/lang/Void.html>` | A `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` that can be used to determine when the cancelAllWork has completed |

### cancelAllWorkByTag

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

```
public abstract @NonNull ListenableFuture<Void> cancelAllWorkByTag(@NonNull String tag)
```

Cancels all unfinished work with the given tag. Note that cancellation is a best-effort policy and work that is already executing may continue to run. Upon cancellation, `https://developer.android.com/reference/androidx/work/ListenableWorker#onStopped()` will be invoked for any affected workers.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html tag` | The tag used to identify the work |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html 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 cancelAllWorkByTag has completed |

### cancelUniqueWork

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

```
public abstract @NonNull ListenableFuture<Void> cancelUniqueWork(@NonNull String uniqueWorkName)
```

Cancels all unfinished work in the work chain with the given name. Note that cancellation is a best-effort policy and work that is already executing may continue to run. Upon cancellation, `https://developer.android.com/reference/androidx/work/ListenableWorker#onStopped()` will be invoked for any affected workers.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html uniqueWorkName` | The unique name used to identify the chain of work |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<https://developer.android.com/reference/java/lang/Void.html>` | A `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` that can be used to determine when the cancelUniqueWork has completed |

### cancelWorkById

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

```
public abstract @NonNull ListenableFuture<Void> cancelWorkById(@NonNull UUID id)
```

Cancels work with the given id if it isn't finished. Note that cancellation is a best-effort policy and work that is already executing may continue to run. Upon cancellation, `https://developer.android.com/reference/androidx/work/ListenableWorker#onStopped()` will be invoked for any affected workers.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/UUID.html id` | The id of the work |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<https://developer.android.com/reference/java/lang/Void.html>` | A `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` that can be used to determine when the cancelWorkById has completed |

### enqueue

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

```
public abstract @NonNull ListenableFuture<Void> enqueue(@NonNull WorkRequest request)
```

Enqueues one item for background processing.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/WorkRequest request` | The `https://developer.android.com/reference/androidx/work/WorkRequest` to enqueue |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<https://developer.android.com/reference/java/lang/Void.html>` | A `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 |

### enqueue

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

```
public abstract @NonNull ListenableFuture<Void> enqueue(@NonNull List<WorkRequest> requests)
```

Enqueues one or more items for background processing.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/work/WorkRequest> requests` | One or more `https://developer.android.com/reference/androidx/work/WorkRequest` to enqueue |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<https://developer.android.com/reference/java/lang/Void.html>` | A `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 |

### enqueueUniquePeriodicWork

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

```
public abstract @NonNull ListenableFuture<Void> enqueueUniquePeriodicWork(
    @NonNull String uniqueWorkName,
    @NonNull ExistingPeriodicWorkPolicy existingPeriodicWorkPolicy,
    @NonNull PeriodicWorkRequest periodicWork
)
```

This method allows you to enqueue a uniquely-named `https://developer.android.com/reference/androidx/work/PeriodicWorkRequest`, where only one PeriodicWorkRequest of a particular name can be active at a time. For example, you may only want one sync operation to be active. If there is one pending, you can choose to let it run or replace it with your new work.

The `uniqueWorkName` uniquely identifies this PeriodicWorkRequest.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html uniqueWorkName` | A unique name which for this operation |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/ExistingPeriodicWorkPolicy existingPeriodicWorkPolicy` | An `https://developer.android.com/reference/androidx/work/ExistingPeriodicWorkPolicy` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/PeriodicWorkRequest periodicWork` | A `https://developer.android.com/reference/androidx/work/PeriodicWorkRequest` to enqueue. `REPLACE` ensures that if there is pending work labelled with `uniqueWorkName`, it will be cancelled and the new work will run. `KEEP` will run the new PeriodicWorkRequest only if there is no pending work labelled with `uniqueWorkName`. |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html 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 |

### enqueueUniqueWork

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

```
public abstract @NonNull ListenableFuture<Void> enqueueUniqueWork(
    @NonNull String uniqueWorkName,
    @NonNull ExistingWorkPolicy existingWorkPolicy,
    @NonNull List<OneTimeWorkRequest> work
)
```

This method allows you to enqueue `work` requests to a uniquely-named `https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkContinuation`, where only one continuation of a particular name can be active at a time. For example, you may only want one sync operation to be active. If there is one pending, you can choose to let it run or replace it with your new work.

The `uniqueWorkName` uniquely identifies this `https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkContinuation`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html uniqueWorkName` | A unique name which for this operation |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/ExistingWorkPolicy existingWorkPolicy` | An `https://developer.android.com/reference/androidx/work/ExistingWorkPolicy` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/work/OneTimeWorkRequest> work` | `https://developer.android.com/reference/androidx/work/OneTimeWorkRequest`s to enqueue. `REPLACE` ensures that if there is pending work labelled with `uniqueWorkName`, it will be cancelled and the new work will run. `KEEP` will run the new OneTimeWorkRequests only if there is no pending work labelled with `uniqueWorkName`. `APPEND` will append the OneTimeWorkRequests as leaf nodes labelled with `uniqueWorkName`. |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<https://developer.android.com/reference/java/lang/Void.html>` | A `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 |

### enqueueUniqueWork

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

```
public final @NonNull ListenableFuture<Void> enqueueUniqueWork(
    @NonNull String uniqueWorkName,
    @NonNull ExistingWorkPolicy existingWorkPolicy,
    @NonNull OneTimeWorkRequest work
)
```

This method allows you to enqueue `work` requests to a uniquely-named `https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkContinuation`, where only one continuation of a particular name can be active at a time. For example, you may only want one sync operation to be active. If there is one pending, you can choose to let it run or replace it with your new work.

The `uniqueWorkName` uniquely identifies this `https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkContinuation`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html uniqueWorkName` | A unique name which for this operation |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/ExistingWorkPolicy existingWorkPolicy` | An `https://developer.android.com/reference/androidx/work/ExistingWorkPolicy`; see below for more information |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/OneTimeWorkRequest work` | The `https://developer.android.com/reference/androidx/work/OneTimeWorkRequest`s to enqueue. `REPLACE` ensures that if there is pending work labelled with `uniqueWorkName`, it will be cancelled and the new work will run. `KEEP` will run the new OneTimeWorkRequests only if there is no pending work labelled with `uniqueWorkName`. `APPEND` will append the OneTimeWorkRequests as leaf nodes labelled with `uniqueWorkName`. |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<https://developer.android.com/reference/java/lang/Void.html>` | A `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 |

### getInstance

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

```
public static @NonNull RemoteWorkManager getInstance(@NonNull Context context)
```

Gets the instance of `https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkManager` which provides a subset of `https://developer.android.com/reference/androidx/work/WorkManager` APIs that are safe to use for apps that use multiple processes.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Context.html context` | The application context. |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkManager` | The instance of `https://developer.android.com/reference/androidx/work/multiprocess/RemoteWorkManager`. |

### getWorkInfos

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

```
public abstract @NonNull ListenableFuture<List<WorkInfo>> getWorkInfos(@NonNull WorkQuery workQuery)
```

Gets the `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` of the `https://developer.android.com/reference/java/util/List.html` of `https://developer.android.com/reference/androidx/work/WorkInfo` for all work referenced by the `https://developer.android.com/reference/androidx/work/WorkQuery` specification.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/work/WorkQuery workQuery` | The work query specification |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/work/WorkInfo>>` | A `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` of the `https://developer.android.com/reference/java/util/List.html` of `https://developer.android.com/reference/androidx/work/WorkInfo` for work referenced by this `https://developer.android.com/reference/androidx/work/WorkQuery`. |