# Config

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/Config.kt+class:androidx.xr.runtime.Config) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-runtime#1.0.0)

*** ** * ** ***


```
class Config
```

<br />

*** ** * ** ***

Configuration state of all available features to be set at runtime.

An instance of this class should be passed to `https://developer.android.com/reference/kotlin/androidx/xr/runtime/Session#configure(androidx.xr.runtime.Config)` to set the current configuration. Use `https://developer.android.com/reference/kotlin/androidx/xr/runtime/Config.Builder` to specify individual configuration settings, and use `https://developer.android.com/reference/kotlin/androidx/xr/runtime/Config.Builder#build()` to create an instance of `https://developer.android.com/reference/kotlin/androidx/xr/runtime/Config` to pass to `https://developer.android.com/reference/kotlin/androidx/xr/runtime/Session#configure(androidx.xr.runtime.Config)`.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/xr/runtime/Config.Builder` This class can be used to create a `https://developer.android.com/reference/kotlin/androidx/xr/runtime/Config` instance. |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/Config#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `https://developer.android.com/reference/kotlin/androidx/xr/runtime/SpatialAnnotationTrackingMode` | `@https://developer.android.com/reference/kotlin/androidx/xr/runtime/ExperimentalSpatialAnnotationsApi https://developer.android.com/reference/kotlin/androidx/xr/runtime/Config#getSpatialAnnotationTracking()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/Config#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/Config#toString()()` Returns a string representation of `https://developer.android.com/reference/kotlin/androidx/xr/runtime/Config` for debugging. |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/runtime/AnchorPersistenceMode` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/Config#anchorPersistence()` feature that allows anchors to be persisted through sessions. |
| `https://developer.android.com/reference/kotlin/androidx/xr/runtime/AugmentedImageDatabase?` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/Config#augmentedImageDatabase()` the current active `https://developer.android.com/reference/kotlin/androidx/xr/runtime/AugmentedImageDatabase`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://developer.android.com/reference/kotlin/androidx/xr/runtime/AugmentedObjectCategory>` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/Config#augmentedObjectCategories()` feature that allows tracking of recognizable objects in the environment. |
| `https://developer.android.com/reference/kotlin/androidx/xr/runtime/DepthEstimationMode` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/Config#depthEstimation()` feature that allows more accurate information about scene depth and meshes. |
| `https://developer.android.com/reference/kotlin/androidx/xr/runtime/DeviceTrackingMode` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/Config#deviceTracking()` feature that allows tracking of the AR device. |
| `https://developer.android.com/reference/kotlin/androidx/xr/runtime/EyeTrackingMode` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/Config#eyeTracking()` feature that allows tracking of the users gaze direction. |
| `https://developer.android.com/reference/kotlin/androidx/xr/runtime/FaceTrackingMode` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/Config#faceTracking()` feature that allows the tracking of human faces. |
| `https://developer.android.com/reference/kotlin/androidx/xr/runtime/GeospatialMode` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/Config#geospatial()` feature that allows geospatial localization and tracking. |
| `https://developer.android.com/reference/kotlin/androidx/xr/runtime/HandTrackingMode` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/Config#handTracking()` feature that allows tracking of the user's hands and hand joints. |
| `https://developer.android.com/reference/kotlin/androidx/xr/runtime/PlaneTrackingMode` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/Config#planeTracking()` feature that allows tracking of and provides information about scene planes. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/Config#qrCodeSizeMeters()` the physical size in meters of the QR code. |
| `https://developer.android.com/reference/kotlin/androidx/xr/runtime/QrCodeTrackingMode` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/Config#qrCodeTracking()` feature that allows tracking of and provides information about QR codes See `https://developer.android.com/reference/kotlin/androidx/xr/runtime/QrCodeTrackingMode` |

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```

### getSpatialAnnotationTracking

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

```
@ExperimentalSpatialAnnotationsApi
fun getSpatialAnnotationTracking(): SpatialAnnotationTrackingMode
```

### hashCode

```
open fun hashCode(): Int
```

### toString

```
open fun toString(): String
```

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

Note: Not intended for production use.

## Public properties

### anchorPersistence

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

```
val anchorPersistence: AnchorPersistenceMode
```

feature that allows anchors to be persisted through sessions. See `https://developer.android.com/reference/kotlin/androidx/xr/runtime/AnchorPersistenceMode`

### augmentedImageDatabase

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

```
val augmentedImageDatabase: AugmentedImageDatabase?
```

the current active `https://developer.android.com/reference/kotlin/androidx/xr/runtime/AugmentedImageDatabase`. If not empty, the image tracking feature will be enabled

### augmentedObjectCategories

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

```
val augmentedObjectCategories: Set<AugmentedObjectCategory>
```

feature that allows tracking of recognizable objects in the environment. See `https://developer.android.com/reference/kotlin/androidx/xr/runtime/AugmentedObjectCategory`

### depthEstimation

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

```
val depthEstimation: DepthEstimationMode
```

feature that allows more accurate information about scene depth and meshes. See `https://developer.android.com/reference/kotlin/androidx/xr/runtime/DepthEstimationMode`

### deviceTracking

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

```
val deviceTracking: DeviceTrackingMode
```

feature that allows tracking of the AR device. See `https://developer.android.com/reference/kotlin/androidx/xr/runtime/DeviceTrackingMode`

### eyeTracking

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

```
val eyeTracking: EyeTrackingMode
```

feature that allows tracking of the users gaze direction. See `https://developer.android.com/reference/kotlin/androidx/xr/runtime/EyeTrackingMode`

### faceTracking

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

```
val faceTracking: FaceTrackingMode
```

feature that allows the tracking of human faces. See `https://developer.android.com/reference/kotlin/androidx/xr/runtime/FaceTrackingMode`

### geospatial

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

```
val geospatial: GeospatialMode
```

feature that allows geospatial localization and tracking. See `https://developer.android.com/reference/kotlin/androidx/xr/runtime/GeospatialMode`

### handTracking

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

```
val handTracking: HandTrackingMode
```

feature that allows tracking of the user's hands and hand joints. See `https://developer.android.com/reference/kotlin/androidx/xr/runtime/HandTrackingMode`

### planeTracking

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

```
val planeTracking: PlaneTrackingMode
```

feature that allows tracking of and provides information about scene planes. See `https://developer.android.com/reference/kotlin/androidx/xr/runtime/PlaneTrackingMode`

### qrCodeSizeMeters

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

```
val qrCodeSizeMeters: Float
```

the physical size in meters of the QR code. If zero, the physical size will be estimated if the device supports it. If physical size estimation is not supported, configuring the `https://developer.android.com/reference/kotlin/androidx/xr/runtime/Session` adding an entry with qrCodeSizeMeters being 0f or lower will throw an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html`. It requires `https://developer.android.com/reference/kotlin/androidx/xr/runtime/Config#qrCodeTracking()` to be different from `https://developer.android.com/reference/kotlin/androidx/xr/runtime/QrCodeTrackingMode#DISABLED()`

### qrCodeTracking

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

```
val qrCodeTracking: QrCodeTrackingMode
```

feature that allows tracking of and provides information about QR codes See `https://developer.android.com/reference/kotlin/androidx/xr/runtime/QrCodeTrackingMode`