# DepthEstimationMode

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

*** ** * ** ***


```
public final class DepthEstimationMode
```

<br />

*** ** * ** ***

Feature that allows more accurate information about scene depth and meshes.

## Summary

| ### Public fields |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/DepthEstimationMode` | `https://developer.android.com/reference/androidx/xr/runtime/DepthEstimationMode#DISABLED()` No information about scene depth will be provided. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/DepthEstimationMode` | `https://developer.android.com/reference/androidx/xr/runtime/DepthEstimationMode#RAW_ONLY()` Depth estimation will be enabled with raw depth and confidence. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/DepthEstimationMode` | `https://developer.android.com/reference/androidx/xr/runtime/DepthEstimationMode#SMOOTH_AND_RAW()` Depth estimation will be enabled with both raw and smooth depth and confidence. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/DepthEstimationMode` | `https://developer.android.com/reference/androidx/xr/runtime/DepthEstimationMode#SMOOTH_ONLY()` Depth estimation will be enabled with smooth depth and confidence. |

| ### Public methods |
|---|---|
| `final int` | `https://developer.android.com/reference/androidx/xr/runtime/DepthEstimationMode#getMode()()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/xr/runtime/DepthEstimationMode#toString()()` Returns a string representation of `https://developer.android.com/reference/androidx/xr/runtime/DepthEstimationMode` for debugging. |

## Public fields

### DISABLED

```
public static final @NonNull DepthEstimationMode DISABLED
```

No information about scene depth will be provided.

### RAW_ONLY

```
public static final @NonNull DepthEstimationMode RAW_ONLY
```

Depth estimation will be enabled with raw depth and confidence.

Supported runtimes:

- OpenXR

- Play Services (on supported devices)

Required permissions:

- `https://developer.android.com/reference/androidx/xr/runtime/manifest/package-summary#SCENE_UNDERSTANDING_FINE()` (OpenXR runtimes only)

- `https://developer.android.com/reference/android/Manifest.permission.html#CAMERA` (Play Services runtimes only)

### SMOOTH_AND_RAW

```
public static final @NonNull DepthEstimationMode SMOOTH_AND_RAW
```

Depth estimation will be enabled with both raw and smooth depth and confidence. Note that setting this mode will consume additional runtime resources.

Supported runtimes:

- Play Services (on supported devices)

Required permissions:

- `https://developer.android.com/reference/android/Manifest.permission.html#CAMERA` (Play Services runtimes only)

### SMOOTH_ONLY

```
public static final @NonNull DepthEstimationMode SMOOTH_ONLY
```

Depth estimation will be enabled with smooth depth and confidence.

Supported runtimes:

- OpenXR

- Play Services (on supported devices)

Required permissions:

- `https://developer.android.com/reference/androidx/xr/runtime/manifest/package-summary#SCENE_UNDERSTANDING_FINE()` (OpenXR runtimes only)

- `https://developer.android.com/reference/android/Manifest.permission.html#CAMERA` (Play Services runtimes only)

## Public methods

### getMode

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

```
public final int getMode()
```

### toString

```
public @NonNull String toString()
```

Returns a string representation of `https://developer.android.com/reference/androidx/xr/runtime/DepthEstimationMode` for debugging.

Note: Not intended for production use.