WorkRequest

abstract class WorkRequest

Known direct subclasses
OneTimeWorkRequest

A WorkRequest for non-repeating work.

PeriodicWorkRequest

A WorkRequest for repeating work.


The base class for specifying parameters for work that should be enqueued in WorkManager. There are two concrete implementations of this class: OneTimeWorkRequest and PeriodicWorkRequest.

Summary

Nested types

abstract class WorkRequest.Builder<B : WorkRequest.Builder<B, *>, W : WorkRequest>

A builder for WorkRequests.

Constants

const Long

The default initial backoff time (in milliseconds) for work that has to be retried.

const Long

The maximum backoff time (in milliseconds) for work that has to be retried.

const Long

The minimum backoff time for work (in milliseconds) that has to be retried.

Public properties

open UUID

The unique identifier associated with this unit of work.

Constants

DEFAULT_BACKOFF_DELAY_MILLIS

const val DEFAULT_BACKOFF_DELAY_MILLIS = 30000: Long

The default initial backoff time (in milliseconds) for work that has to be retried.

MAX_BACKOFF_MILLIS

const val MAX_BACKOFF_MILLISLong

The maximum backoff time (in milliseconds) for work that has to be retried.

MIN_BACKOFF_MILLIS

const val MIN_BACKOFF_MILLISLong

The minimum backoff time for work (in milliseconds) that has to be retried.

Public properties

id

Added in 1.0.0
open val idUUID

The unique identifier associated with this unit of work.