# WorkRequest

Artifact: [androidx.work:work-runtime](https://developer.android.com/jetpack/androidx/releases/work) [View Source](https://cs.android.com/search?q=file:androidx/work/WorkRequest.kt+class:androidx.work.WorkRequest) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/work#1.0.0)

*** ** * ** ***


```
public abstract class WorkRequest
```

<br />

Known direct subclasses [OneTimeWorkRequest](https://developer.android.com/reference/androidx/work/OneTimeWorkRequest), [PeriodicWorkRequest](https://developer.android.com/reference/androidx/work/PeriodicWorkRequest)

|---|---|
| `https://developer.android.com/reference/androidx/work/OneTimeWorkRequest` | A `https://developer.android.com/reference/androidx/work/WorkRequest` for non-repeating work. |
| `https://developer.android.com/reference/androidx/work/PeriodicWorkRequest` | A `https://developer.android.com/reference/androidx/work/WorkRequest` for repeating work. |

*** ** * ** ***

The base class for specifying parameters for work that should be enqueued in `https://developer.android.com/reference/androidx/work/WorkManager`. There are two concrete implementations of this class: `https://developer.android.com/reference/androidx/work/OneTimeWorkRequest` and `https://developer.android.com/reference/androidx/work/PeriodicWorkRequest`.

## Summary

| ### Nested types |
|---|
| `public abstract class https://developer.android.com/reference/androidx/work/WorkRequest.Builder<B extends https://developer.android.com/reference/androidx/work/WorkRequest.Builder<@https://developer.android.com/reference/androidx/annotation/NonNull B, @https://developer.android.com/reference/androidx/annotation/NonNull ?>, W extends https://developer.android.com/reference/androidx/work/WorkRequest>` A builder for `https://developer.android.com/reference/androidx/work/WorkRequest`s. |

| ### Constants |
|---|---|
| `static final long` | `https://developer.android.com/reference/androidx/work/WorkRequest#DEFAULT_BACKOFF_DELAY_MILLIS() = 30000` The default initial backoff time (in milliseconds) for work that has to be retried. |
| `static final long` | `https://developer.android.com/reference/androidx/work/WorkRequest#MAX_BACKOFF_MILLIS()` The maximum backoff time (in milliseconds) for work that has to be retried. |
| `static final long` | `https://developer.android.com/reference/androidx/work/WorkRequest#MIN_BACKOFF_MILLIS()` The minimum backoff time for work (in milliseconds) that has to be retried. |

| ### Public methods |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/UUID.html` | `https://developer.android.com/reference/androidx/work/WorkRequest#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

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

```
public @NonNull UUID getId()
```

The unique identifier associated with this unit of work.