State
class State
kotlin.Any | ||
↳ | kotlin.Enum<androidx.work.WorkInfo.State> | |
↳ | androidx.work.WorkInfo.State |
The current lifecycle state of a WorkRequest
.
Summary
Enum values | |
---|---|
Used to indicate that the |
|
Used to indicate that the |
|
Used to indicate that the |
|
Used to indicate that the |
|
Used to indicate that the |
|
Used to indicate that the |
Public methods | |
---|---|
Boolean |
Returns |
Enum values
BLOCKED
enum val BLOCKED : WorkInfo.State
Used to indicate that the WorkRequest
is currently blocked because its prerequisites haven't finished successfully.
CANCELLED
enum val CANCELLED : WorkInfo.State
Used to indicate that the WorkRequest
has been cancelled and will not execute. All dependent work will also be marked as CANCELLED
and will not run.
ENQUEUED
enum val ENQUEUED : WorkInfo.State
Used to indicate that the WorkRequest
is enqueued and eligible to run when its Constraints
are met and resources are available.
FAILED
enum val FAILED : WorkInfo.State
Used to indicate that the WorkRequest
has completed in a failure state. All dependent work will also be marked as FAILED
and will never run.
RUNNING
enum val RUNNING : WorkInfo.State
Used to indicate that the WorkRequest
is currently being executed.
SUCCEEDED
enum val SUCCEEDED : WorkInfo.State
Used to indicate that the WorkRequest
has completed in a successful state. Note that PeriodicWorkRequest
s will never enter this state (they will simply go back to ENQUEUED
and be eligible to run again).