RemoteWorkManager

public abstract class RemoteWorkManager
extends Object

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


A subset of WorkManager APIs that are available for apps that use multiple processes.

Summary

Public methods

abstract RemoteWorkContinuation beginUniqueWork(String uniqueWorkName, ExistingWorkPolicy existingWorkPolicy, 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.

final RemoteWorkContinuation beginUniqueWork(String uniqueWorkName, ExistingWorkPolicy existingWorkPolicy, 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 RemoteWorkContinuation beginWith(OneTimeWorkRequest work)

Begins a chain with one or more OneTimeWorkRequests, which can be enqueued together in the future using RemoteWorkContinuation.enqueue().

abstract RemoteWorkContinuation beginWith(List<OneTimeWorkRequest> work)

Begins a chain with one or more OneTimeWorkRequests, which can be enqueued together in the future using RemoteWorkContinuation.enqueue().

abstract ListenableFuture<Void> cancelAllWork()

Cancels all unfinished work.

abstract ListenableFuture<Void> cancelAllWorkByTag(String tag)

Cancels all unfinished work with the given tag.

abstract ListenableFuture<Void> cancelUniqueWork(String uniqueWorkName)

Cancels all unfinished work in the work chain with the given name.

abstract ListenableFuture<Void> cancelWorkById(UUID id)

Cancels work with the given id if it isn't finished.

abstract ListenableFuture<Void> enqueue(WorkRequest request)

Enqueues one item for background processing.

abstract ListenableFuture<Void> enqueue(List<WorkRequest> requests)

Enqueues one or more items for background processing.

abstract ListenableFuture<Void> enqueueUniquePeriodicWork(String uniqueWorkName, ExistingPeriodicWorkPolicy existingPeriodicWorkPolicy,