# AnchorPersistenceMode

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

*** ** * ** ***


```
class AnchorPersistenceMode
```

<br />

*** ** * ** ***

Feature that allows anchors to be persisted through sessions.

## Summary

| ### Public companion properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/runtime/AnchorPersistenceMode` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/AnchorPersistenceMode#DISABLED()` Anchors cannot be persisted. |
| `https://developer.android.com/reference/kotlin/androidx/xr/runtime/AnchorPersistenceMode` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/AnchorPersistenceMode#LOCAL()` Anchors may be persisted and will be saved in the application's local storage. |

| ### Public functions |
|---|---|
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/AnchorPersistenceMode#toString()()` Returns a string representation of `https://developer.android.com/reference/kotlin/androidx/xr/runtime/AnchorPersistenceMode` for debugging. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/AnchorPersistenceMode#mode()` |

## Public companion properties

### DISABLED

```
val DISABLED: AnchorPersistenceMode
```

Anchors cannot be persisted.

### LOCAL

```
val LOCAL: AnchorPersistenceMode
```

Anchors may be persisted and will be saved in the application's local storage.

Supported runtimes:

- OpenXR

Required permissions: None

## Public functions

### toString

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

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

Note: Not intended for production use.

## Public properties

### mode

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

```
val mode: Int
```