public enum WorkInfo.State extends Enum

The current lifecycle state of a WorkRequest.

Summary

Enum Values

Public methods

isFinished

public final boolean isFinished()

Returns true if this State is considered finished: .SUCCEEDED, .FAILED, and * .CANCELLED

valueOf

public final @NonNull WorkInfo.State valueOf(@NonNull String value)

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

values

public final @NonNull WorkInfo.State[] values()

Returns an array containing the constants of this enum type, in the order they're declared.

This method may be used to iterate over the constants.

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.