# ArDevice

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

*** ** * ** ***


```
class ArDevice : Trackable<ArDevice.State>
```

<br />

*** ** * ** ***

Contains the information of the device that locates it with respect to the real world.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/xr/arcore/ArDevice.State : https://developer.android.com/reference/kotlin/androidx/xr/arcore/Trackable.State` Contains the current state of the AR Device tracking. |

| ### Public companion functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/arcore/ArDevice` | `https://developer.android.com/reference/kotlin/androidx/xr/arcore/ArDevice#getInstance(androidx.xr.runtime.Session)(session: https://developer.android.com/reference/kotlin/androidx/xr/runtime/Session)` Returns the AR device tracking data. |

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

| ### Public properties |
|---|---|
| `open https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-state-flow/index.html<https://developer.android.com/reference/kotlin/androidx/xr/arcore/ArDevice.State>` | `https://developer.android.com/reference/kotlin/androidx/xr/arcore/ArDevice#state()` the current `https://developer.android.com/reference/kotlin/androidx/xr/arcore/ArDevice.State` of the AR device tracking |

## Public companion functions

### getInstance

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

```
fun getInstance(session: Session): ArDevice
```

Returns the AR device tracking data.

| Parameters |
|---|---|
| `session: https://developer.android.com/reference/kotlin/androidx/xr/runtime/Session` | the currently active `https://developer.android.com/reference/kotlin/androidx/xr/runtime/Session` |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` | if `https://developer.android.com/reference/kotlin/androidx/xr/runtime/Session#config()` is set to `https://developer.android.com/reference/kotlin/androidx/xr/runtime/DeviceTrackingMode#DISABLED()` |

## Public functions

### equals

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

### hashCode

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

### toString

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

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

Note: Not intended for production use.

## Public properties

### state

```
open val state: StateFlow<ArDevice.State>
```

the current `https://developer.android.com/reference/kotlin/androidx/xr/arcore/ArDevice.State` of the AR device tracking