WorkRequest | API reference | Android Developers (original) (raw)
public abstract class WorkRequest
The base class for specifying parameters for work that should be enqueued in [WorkManager](/reference/androidx/work/WorkManager). There are two concrete implementations of this class: [OneTimeWorkRequest](/reference/androidx/work/OneTimeWorkRequest) and [PeriodicWorkRequest](/reference/androidx/work/PeriodicWorkRequest).
Summary
| Constants | |
|---|---|
| static final long | DEFAULT_BACKOFF_DELAY_MILLIS = 30000 The default initial backoff time (in milliseconds) for work that has to be retried. |
| static final long | MAX_BACKOFF_MILLIS The maximum backoff time (in milliseconds) for work that has to be retried. |
| static final long | MIN_BACKOFF_MILLIS The minimum backoff time for work (in milliseconds) that has to be retried. |
| Public methods | |
|---|---|
| @NonNull UUID | getId() The unique identifier associated with this unit of work. |
Constants
DEFAULT_BACKOFF_DELAY_MILLIS
public static final long DEFAULT_BACKOFF_DELAY_MILLIS = 30000
The default initial backoff time (in milliseconds) for work that has to be retried.
MAX_BACKOFF_MILLIS
public static final long MAX_BACKOFF_MILLIS
The maximum backoff time (in milliseconds) for work that has to be retried.
MIN_BACKOFF_MILLIS
public static final long MIN_BACKOFF_MILLIS
The minimum backoff time for work (in milliseconds) that has to be retried.
Public methods
getId
The unique identifier associated with this unit of work.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-05-15 UTC.