WorkRequest
abstract class WorkRequest
kotlin.Any | |
↳ | androidx.work.WorkRequest |
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 classes | |
---|---|
abstract |
A builder for |
Constants | |
---|---|
static Long |
The default initial backoff time (in milliseconds) for work that has to be retried. |
static Long |
The maximum backoff time (in milliseconds) for work that has to be retried. |
static Long |
The minimum backoff time for work (in milliseconds) that has to be retried. |
Public methods | |
---|---|
open UUID |
getId() Gets the unique identifier associated with this unit of work. |
Constants
DEFAULT_BACKOFF_DELAY_MILLIS
static val DEFAULT_BACKOFF_DELAY_MILLIS: Long
The default initial backoff time (in milliseconds) for work that has to be retried.
Value: 30000L
MAX_BACKOFF_MILLIS
static val MAX_BACKOFF_MILLIS: Long
The maximum backoff time (in milliseconds) for work that has to be retried.
Value: 5 * 60 * 60 * 1000
MIN_BACKOFF_MILLIS
static val MIN_BACKOFF_MILLIS: Long
The minimum backoff time for work (in milliseconds) that has to be retried.
Value: 10 * 1000