WorkManager.UpdateResult


enum WorkManager.UpdateResult : Enum


An enumeration of results for WorkManager.updateWork method.

Summary

Enum Values

APPLIED_FOR_NEXT_RUN

An update was successfully applied, but the worker being updated was running.

APPLIED_IMMEDIATELY

An update was successfully applied immediately, meaning the updated work wasn't currently running in the moment of the request.

NOT_APPLIED

An update wasn't applied, because Worker has already finished.

Public functions

WorkManager.UpdateResult
valueOf(value: String)

Returns the enum constant of this type with the specified name.

Array<WorkManager.UpdateResult>

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

Public properties

EnumEntries<WorkManager.UpdateResult>

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Enum Values

APPLIED_FOR_NEXT_RUN

val WorkManager.UpdateResult.APPLIED_FOR_NEXT_RUNWorkManager.UpdateResult

An update was successfully applied, but the worker being updated was running. This run isn't interrupted and will continue to rely on previous state of the request, e.g. using old constraints, tags etc. However, on the next run, e.g. retry of one-time Worker or another iteration of periodic worker, the new worker specification. will be used.

APPLIED_IMMEDIATELY

val WorkManager.UpdateResult.APPLIED_IMMEDIATELYWorkManager.UpdateResult

An update was successfully applied immediately, meaning the updated work wasn't currently running in the moment of the request. See UpdateResult.APPLIED_FOR_NEXT_RUN for the case of running worker.

NOT_APPLIED

val WorkManager.UpdateResult.NOT_APPLIEDWorkManager.UpdateResult

An update wasn't applied, because Worker has already finished.

Public functions

valueOf

Added in 2.8.0
fun valueOf(value: String): WorkManager.UpdateResult

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.)

Throws
kotlin.IllegalArgumentException

if this enum type has no constant with the specified name

values

Added in 2.8.0
fun values(): Array<WorkManager.UpdateResult>

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.

Public properties

entries

val entriesEnumEntries<WorkManager.UpdateResult>

Returns a representation of an immutable list of all enum entries, in the order they're declared.

This method may be used to iterate over the enum entries.