# DeviceTrackingMode

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

*** ** * ** ***


```
class DeviceTrackingMode
```

<br />

*** ** * ** ***

Feature that allows tracking of the AR device.

## Summary

| ### Public companion properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/runtime/DeviceTrackingMode` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/DeviceTrackingMode#DISABLED()` The device pose will not be tracked. |
| `https://developer.android.com/reference/kotlin/androidx/xr/runtime/DeviceTrackingMode` | `@https://developer.android.com/reference/kotlin/androidx/xr/runtime/ExperimentalInertialTrackingApi https://developer.android.com/reference/kotlin/androidx/xr/runtime/DeviceTrackingMode#INERTIAL()` Tracks device pose with 3DoF (rotation only) and provides the last known pose from the system. |
| `https://developer.android.com/reference/kotlin/androidx/xr/runtime/DeviceTrackingMode` | `https://developer.android.com/reference/kotlin/androidx/xr/runtime/DeviceTrackingMode#SPATIAL()` Tracks device pose and provides the last known 6DoF (rotation and translation) pose from the system. |

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

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

## Public companion properties

### DISABLED

```
val DISABLED: DeviceTrackingMode
```

The device pose will not be tracked. In this mode, `https://developer.android.com/reference/kotlin/androidx/xr/arcore/RenderViewpoint` will not emit updates to `https://developer.android.com/reference/kotlin/androidx/xr/arcore/RenderViewpoint.State#pose()`.

### INERTIAL

```
@ExperimentalInertialTrackingApi
val INERTIAL: DeviceTrackingMode
```

Tracks device pose with 3DoF (rotation only) and provides the last known pose from the system. Note that there is generally a delay between the actual device pose and the pose provided by the system by the time of the update.

Supported runtimes:

- Projected

### SPATIAL

```
val SPATIAL: DeviceTrackingMode
```

Tracks device pose and provides the last known 6DoF (rotation and translation) pose from the system. Note that there is generally a delay between the actual device pose and the pose provided by the system by the time of the update.

Supported runtimes:

- OpenXR

- Play Services

Required permissions:

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

## Public functions

### toString

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

Returns a string representation of `https://developer.android.com/reference/kotlin/androidx/xr/runtime/DeviceTrackingMode` 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
```