# 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)

*** ** * ** ***


```
public final class Face implements Trackable<@NonNull Face.State>
```

<br />

*** ** * ** ***

Contains the tracking information of a detected human face.

## Summary

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

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/xr/arcore/Face#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-state-flow/index.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/arcore/Face.State>` | `https://developer.android.com/reference/androidx/xr/arcore/Face#getState()()` The current `https://developer.android.com/reference/androidx/xr/arcore/Face.State` of this Face. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/arcore/Face` | `https://developer.android.com/reference/androidx/xr/arcore/Face#getUserFace(androidx.xr.runtime.Session)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/runtime/Session session)` Returns the Face object that corresponds to the user. |
| `int` | `https://developer.android.com/reference/androidx/xr/arcore/Face#hashCode()()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/xr/arcore/Face#toString()()` |

## Public methods

### equals

```
public boolean equals(Object other)
```

### getState

```
public @NonNull StateFlow<@NonNull Face.State> getState()
```

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

### getUserFace

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

```
public static final @NonNull Face getUserFace(@NonNull Session session)
```

Returns the Face object that corresponds to the user.

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

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

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```