# Face

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

*** ** * ** ***


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

<br />

*** ** * ** ***

Contains the tracking information of a detected human face.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/xr/arcore/Face.State : https://developer.android.com/reference/kotlin/androidx/xr/arcore/Trackable.State` The representation of the current state of `https://developer.android.com/reference/kotlin/androidx/xr/arcore/Face`. |

| ### Public companion functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/arcore/Face` | `https://developer.android.com/reference/kotlin/androidx/xr/arcore/Face#getUserFace(androidx.xr.runtime.Session)(session: https://developer.android.com/reference/kotlin/androidx/xr/runtime/Session)` Returns the Face object that corresponds to the user. |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/arcore/Face#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/Face#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/arcore/Face#toString()()` |

| ### 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/Face.State>` | `https://developer.android.com/reference/kotlin/androidx/xr/arcore/Face#state()` The current `https://developer.android.com/reference/kotlin/androidx/xr/arcore/Face.State` of this Face. |

## Public companion functions

### getUserFace

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

```
fun getUserFace(session: Session): Face
```

Returns the Face object that corresponds to the user.

| 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/Config#faceTracking()` is set to `https://developer.android.com/reference/kotlin/androidx/xr/runtime/FaceTrackingMode#DISABLED()` |

## Public functions

### equals

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

### hashCode

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

### toString

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

## Public properties

### state

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

The current `https://developer.android.com/reference/kotlin/androidx/xr/arcore/Face.State` of this Face.