# DeviceLostReason

Artifact: [androidx.webgpu:webgpu](https://developer.android.com/jetpack/androidx/releases/webgpu) [View Source](https://cs.android.com/search?q=file:androidx/webgpu/DeviceLostReason.kt+class:androidx.webgpu.DeviceLostReason) Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

*** ** * ** ***


```
public final class DeviceLostReason
```

<br />

*** ** * ** ***

Specifies the reason why a device was lost.

## Summary

| ### Constants |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/webgpu/DeviceLostReason#CallbackCancelled() = 3` Indicates the device lost callback was cancelled. |
| `static final int` | `https://developer.android.com/reference/androidx/webgpu/DeviceLostReason#Destroyed() = 2` The device was explicitly destroyed. |
| `static final int` | `https://developer.android.com/reference/androidx/webgpu/DeviceLostReason#FailedCreation() = 4` The device failed to be created. |
| `static final int` | `https://developer.android.com/reference/androidx/webgpu/DeviceLostReason#Unknown() = 1` The reason for the device loss is unknown. |

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/webgpu/DeviceLostReason#toString(kotlin.Int)(int value)` |

## Constants

### CallbackCancelled

```
public static final int CallbackCancelled = 3
```

Indicates the device lost callback was cancelled. This happens if the callback is replaced or unset, or if the device is destroyed cleanly without a specific error.

### Destroyed

```
public static final int Destroyed = 2
```

The device was explicitly destroyed.

### FailedCreation

```
public static final int FailedCreation = 4
```

The device failed to be created.

### Unknown

```
public static final int Unknown = 1
```

The reason for the device loss is unknown.

## Public methods

### toString

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
public static final @NonNull String toString(int value)
```