public final class QrCode implements Trackable


Describes the current best knowledge of a real-world QR code

Summary

Nested types

public final class QrCode.State implements Trackable.State

The representation of the current state of a QrCode.

Public methods

@NonNull StateFlow<@NonNull QrCode.State>

The current state of the QrCode

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

Emits the QR codes that are currently being tracked in the session.

Public methods

getState

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

The current state of the QrCode

subscribe

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

Emits the QR codes that are currently being tracked in the session.

Only instances of QrCode that are androidx.xr.arcore.TrackingState.TRACKING will be emitted in the Collection. Instances of the same QrCode 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 QrCode>>

a StateFlow that emits a collection of QrCodes