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 tracked augmented images in the session.

@NonNull String

Returns a string representation of AugmentedImage for debugging.

Public methods

getState

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

The current state of the AugmentedImage

subscribe

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

Emits tracked augmented images in the session.

Only instances of AugmentedImage that are androidx.xr.arcore.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

toString

public @NonNull String toString()

Returns a string representation of AugmentedImage for debugging.

Note: Not intended for production use.