# WorkManager.UpdateResult

Artifact: [androidx.work:work-runtime](https://developer.android.com/jetpack/androidx/releases/work) [View Source](https://cs.android.com/search?q=file:androidx/work/WorkManager.kt+class:androidx.work.WorkManager.UpdateResult) Added in [2.8.0](https://developer.android.com/jetpack/androidx/releases/work#2.8.0)

*** ** * ** ***


```
enum WorkManager.UpdateResult : Enum<WorkManager.UpdateResult>
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [kotlin.Enum](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-enum/index.html)\<[WorkManager.UpdateResult](https://developer.android.com/reference/kotlin/androidx/work/WorkManager.UpdateResult)\> ||
|   | ↳ | [androidx.work.WorkManager.UpdateResult](https://developer.android.com/reference/kotlin/androidx/work/WorkManager.UpdateResult) |

*** ** * ** ***

An enumeration of results for `https://developer.android.com/reference/kotlin/androidx/work/WorkManager#updateWork(androidx.work.WorkRequest)` method.

## Summary

| ### Enum Values |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/work/WorkManager.UpdateResult#APPLIED_FOR_NEXT_RUN` | An update was successfully applied, but the worker being updated was running. |
| `https://developer.android.com/reference/kotlin/androidx/work/WorkManager.UpdateResult#APPLIED_IMMEDIATELY` | An update was successfully applied immediately, meaning the updated work wasn't currently running in the moment of the request. |
| `https://developer.android.com/reference/kotlin/androidx/work/WorkManager.UpdateResult#NOT_APPLIED` | An update wasn't applied, because `Worker` has already finished. |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/work/WorkManager.UpdateResult` | `https://developer.android.com/reference/kotlin/androidx/work/WorkManager.UpdateResult#valueOf(kotlin.String)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Returns the enum constant of this type with the specified name. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/work/WorkManager.UpdateResult>` | `https://developer.android.com/reference/kotlin/androidx/work/WorkManager.UpdateResult#values()()` Returns an array containing the constants of this enum type, in the order they're declared. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.enums/-enum-entries/index.html<https://developer.android.com/reference/kotlin/androidx/work/WorkManager.UpdateResult>` | `https://developer.android.com/reference/kotlin/androidx/work/WorkManager.UpdateResult#entries()` Returns an immutable `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.enums/-enum-entries/index.html` list containing the constants of this enum type, in the order they're declared. |

## Enum Values

### APPLIED_FOR_NEXT_RUN

```
val WorkManager.UpdateResult.APPLIED_FOR_NEXT_RUN: WorkManager.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_IMMEDIATELY: WorkManager.UpdateResult
```

An update was successfully applied immediately, meaning the updated work wasn't currently running in the moment of the request. See `https://developer.android.com/reference/kotlin/androidx/work/WorkManager.UpdateResult#APPLIED_FOR_NEXT_RUN` for the case of running worker.

### NOT_APPLIED

```
val WorkManager.UpdateResult.NOT_APPLIED: WorkManager.UpdateResult
```

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

## Public functions

### valueOf

Added in [2.8.0](https://developer.android.com/jetpack/androidx/releases/work#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 |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if this enum type has no constant with the specified name |

### values

Added in [2.8.0](https://developer.android.com/jetpack/androidx/releases/work#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.

The function returns a new instance of the array on every call. The array could be mutated, so working with it may also require defensive copying. Consider using `entries` property as a more efficient alternative returning an immutable list of enum entries.

## Public properties

### entries

```
val entries: EnumEntries<WorkManager.UpdateResult>
```

Returns an immutable `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.enums/-enum-entries/index.html` list containing the constants of this enum type, in the order they're declared.