WorkRequest

public abstract class WorkRequest
extends Object

java.lang.Object
   ↳ 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

class WorkRequest.Builder<B extends Builder, W extends WorkRequest>

A builder for WorkRequests. 

Constants

long DEFAULT_BACKOFF_DELAY_MILLIS

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

long MAX_BACKOFF_MILLIS

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

long MIN_BACKOFF_MILLIS

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

Public methods

UUID getId()

Gets the unique identifier associated with this unit of work.

Inherited methods

Constants

DEFAULT_BACKOFF_DELAY_MILLIS

public static final long DEFAULT_BACKOFF_DELAY_MILLIS

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

Constant Value: 30000 (0x0000000000007530)

MAX_BACKOFF_MILLIS

public static final long MAX_BACKOFF_MILLIS

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

Constant Value: 18000000 (0x000000000112a880)

MIN_BACKOFF_MILLIS

public static final long MIN_BACKOFF_MILLIS

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

Constant Value: 10000 (0x0000000000002710)

Public methods

getId

public UUID getId ()

Gets the unique identifier associated with this unit of work.

Returns
UUID The identifier for this unit of work