class QrCode : Trackable


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

Summary

Nested types

The representation of the current state of a QrCode.

Public companion functions

StateFlow<Collection<QrCode>>
subscribe(session: Session)

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

Public properties

open StateFlow<QrCode.State>

The current state of the QrCode

Public companion functions

subscribe

Added in 1.0.0-alpha15
fun subscribe(session: Session): StateFlow<Collection<QrCode>>

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
session: Session

the Session to subscribe to

Returns
StateFlow<Collection<QrCode>>

a StateFlow that emits a collection of QrCodes

Public properties

state

open val stateStateFlow<QrCode.State>

The current state of the QrCode