State

public final enum State
extends Enum<State>

java.lang.Object
   ↳ java.lang.Enum<androidx.work.State>
     ↳ androidx.work.State


The current status of a unit of work.

Summary

Enum values

State  BLOCKED

The status for work that is currently blocked because its prerequisites haven't finished successfully  

State  CANCELLED

The status for work that has been cancelled and will not execute  

State  ENQUEUED

The status for work that is enqueued (hasn't completed and isn't running)  

State  FAILED

The status for work that has completed in a failure state  

State  RUNNING

The status for work that is currently being executed  

State  SUCCEEDED

The status for work that has completed successfully  

Public methods

boolean isFinished()

Returns true if this State is considered finished.

static State valueOf(String name)
static final State[] values()

Inherited methods

Enum values

BLOCKED

State BLOCKED

The status for work that is currently blocked because its prerequisites haven't finished successfully

CANCELLED

State CANCELLED

The status for work that has been cancelled and will not execute

ENQUEUED

State ENQUEUED

The status for work that is enqueued (hasn't completed and isn't running)

FAILED

State FAILED

The status for work that has completed in a failure state

RUNNING

State RUNNING

The status for work that is currently being executed

SUCCEEDED

State SUCCEEDED

The status for work that has completed successfully

Public methods

isFinished

boolean isFinished ()

Returns true if this State is considered finished.

Returns
boolean true for SUCCEEDED, FAILED, and CANCELLED States

valueOf

State valueOf (String name)

Parameters
name String

Returns
State

values

State[] values ()

Returns
State[]