WorkInfo

public final class WorkInfo
extends Object

java.lang.Object
   ↳ androidx.work.WorkInfo


Information about a particular WorkRequest containing the id of the WorkRequest, its current WorkInfo.State, output, and tags. Note that output is only available for the terminal states (WorkInfo.State.SUCCEEDED and WorkInfo.State.FAILED).

Summary

Nested classes

enum WorkInfo.State

The current lifecycle state of a WorkRequest

Public methods

boolean equals(Object o)
UUID getId()

Gets the identifier of the WorkRequest.

Data getOutputData()

Gets the output Data for the WorkRequest.

WorkInfo.State getState()

Gets the current WorkInfo.State of the WorkRequest.

Set<String> getTags()

Gets the Set of tags associated with the WorkRequest.

int hashCode()
String toString()

Inherited methods

Public methods

equals

public boolean equals (Object o)

Parameters
o Object

Returns
boolean

getId

public UUID getId ()

Gets the identifier of the WorkRequest.

Returns
UUID The identifier of a WorkRequest

getOutputData

public Data getOutputData ()

Gets the output Data for the WorkRequest. If the WorkRequest is unfinished, this is always Data.EMPTY.

Returns
Data The output Data of the WorkRequest

getState

public WorkInfo.State getState ()

Gets the current WorkInfo.State of the WorkRequest.

Returns
WorkInfo.State The current WorkInfo.State of the WorkRequest

getTags

public Set<String> getTags ()

Gets the Set of tags associated with the WorkRequest.

Returns
Set<String> The Set of tags associated with the WorkRequest

hashCode

public int hashCode ()

Returns
int

toString

public String toString ()

Returns
String