WorkInfo
class WorkInfo
kotlin.Any | |
↳ | androidx.work.WorkInfo |
Information about a particular WorkRequest
containing the id of the WorkRequest, its current State
, output, tags, and run attempt count. Note that output is only available for the terminal states (State#SUCCEEDED
and State#FAILED
).
Summary
Nested classes | |
---|---|
The current lifecycle state of a |
Public methods | |
---|---|
Boolean | |
UUID |
getId() Gets the identifier of the |
Data |
Gets the output |
Data |
Gets the progress |
Int |
Gets the run attempt count of the |
WorkInfo.State |
getState() Gets the current |
MutableSet<String!> |
getTags() Gets the |
Int |
hashCode() |
String |
toString() |
Public methods
getId
@NonNull fun getId(): UUID
Gets the identifier of the WorkRequest
.
Return | |
---|---|
UUID |
The identifier of a WorkRequest |
getOutputData
@NonNull fun getOutputData(): Data
Gets the output Data
for the WorkRequest
. If the WorkRequest is unfinished, this is always Data#EMPTY
.
Return | |
---|---|
Data |
The output Data of the WorkRequest |
getProgress
@NonNull fun getProgress(): Data
Gets the progress Data
associated with the WorkRequest
.
Return | |
---|---|
Data |
The progress Data associated with the WorkRequest |
getRunAttemptCount
@IntRange(0) fun getRunAttemptCount(): Int
Gets the run attempt count of the WorkRequest
. Note that for PeriodicWorkRequest
s, the run attempt count gets reset between successful runs.
Return | |
---|---|
Int |
The run attempt count of the WorkRequest . |
getState
@NonNull fun getState(): WorkInfo.State
Gets the current State
of the WorkRequest
.
Return | |
---|---|
WorkInfo.State |
The current State of the WorkRequest |
getTags
@NonNull fun getTags(): MutableSet<String!>
Gets the Set
of tags associated with the WorkRequest
.
Return | |
---|---|
MutableSet<String!> |
The Set of tags associated with the WorkRequest |
hashCode
fun hashCode(): Int
toString
fun toString(): String