# AugmentedImage

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

*** ** * ** ***


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

<br />

*** ** * ** ***

Describes the system's current best knowledge of a real-world image

## Summary

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

| ### Public companion functions |
|---|---|
| `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-state-flow/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/index.html<https://developer.android.com/reference/kotlin/androidx/xr/arcore/AugmentedImage>>` | `https://developer.android.com/reference/kotlin/androidx/xr/arcore/AugmentedImage#subscribe(androidx.xr.runtime.Session)(session: https://developer.android.com/reference/kotlin/androidx/xr/runtime/Session)` Emits tracked augmented images in the `https://developer.android.com/reference/kotlin/androidx/xr/arcore/AugmentedImage.Companion#subscribe(androidx.xr.runtime.Session)`. |

| ### Public functions |
|---|---|
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/xr/arcore/AugmentedImage#toString()()` Returns a string representation of `https://developer.android.com/reference/kotlin/androidx/xr/arcore/AugmentedImage` 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/AugmentedImage.State>` | `https://developer.android.com/reference/kotlin/androidx/xr/arcore/AugmentedImage#state()` The current state of the `https://developer.android.com/reference/kotlin/androidx/xr/arcore/AugmentedImage` |

## Public companion functions

### subscribe

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

```
fun subscribe(session: Session): StateFlow<Collection<AugmentedImage>>
```

Emits tracked augmented images in the `https://developer.android.com/reference/kotlin/androidx/xr/arcore/AugmentedImage.Companion#subscribe(androidx.xr.runtime.Session)`.

Only instances of `https://developer.android.com/reference/kotlin/androidx/xr/arcore/AugmentedImage` that are `https://developer.android.com/reference/kotlin/androidx/xr/arcore/TrackingState#TRACKING()` will be emitted in the `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/index.html`. Instances of the same `https://developer.android.com/reference/kotlin/androidx/xr/arcore/AugmentedImage` will remain between subsequent emits to the `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-state-flow/index.html` as long as they remain tracking.

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

| Returns |
|---|---|
| `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-state-flow/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-collection/index.html<https://developer.android.com/reference/kotlin/androidx/xr/arcore/AugmentedImage>>` | a `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-state-flow/index.html` that emits a collection of AugmentedImages |

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

## Public functions

### toString

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

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

Note: Not intended for production use.

## Public properties

### state

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

The current state of the `https://developer.android.com/reference/kotlin/androidx/xr/arcore/AugmentedImage`