AugmentedImage


public final class AugmentedImage implements Trackable


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

Summary

Nested types

public final class AugmentedImage.State implements Trackable.State

The representation of the current state of an AugmentedImage.

Public methods

@NonNull StateFlow<@NonNull AugmentedImage.State>

The current state of the AugmentedImage

static final @NonNull StateFlow<@NonNull Collection<@NonNull AugmentedImage>>

Emits the augmented images that are currently being tracked in the session

Public methods

getState

public @NonNull StateFlow<@NonNull AugmentedImage.StategetState()

The current state of the AugmentedImage

subscribe

Added in 1.0.0-alpha14
public static final @NonNull StateFlow<@NonNull Collection<@NonNull AugmentedImage>> subscribe(@NonNull Session session)

Emits the augmented images that are currently being tracked in the session

Only instances of AugmentedImage that are androidx.xr.runtime.TrackingState.TRACKING will be emitted in the Collection. Instances of the same AugmentedImage will remain between subsequent emits to the StateFlow as long as they remain tracking

Parameters
@NonNull Session session

the Session to subscribe to

Returns
@NonNull StateFlow<@NonNull Collection<@NonNull AugmentedImage>>

a StateFlow that emits a collection of AugmentedImages