AndroidXRImageTrackingSubsystem

The Android XR implementation of the XRImageTrackingSubsystem so it can work seamlessly with ARTrackedImageManager.

Summary

Inheritance

Inherits from: XRImageTrackingSubsystem

Properties

OnImageTrackingConfigured
Action< bool >
This event is invoked when asynchronous image tracking configuration completes.
OnImageTrackingLost
Action
This event is raised if image tracking encounters an internal failure, causing it to stop and invalidating the current configuration.

Public functions

TryGetMarkerData(TrackableId marker, out XRMarkerDictionary dictionary, out int markId)
bool
Try to get the XRMarkerDictionary and the id from the dictionary of a marker image.
TryGetQrCodeData(TrackableId qrCode, out string decodedData)
bool
Try to get the decoded data from a QR code image.

Properties

OnImageTrackingConfigured

Action< bool > OnImageTrackingConfigured

This event is invoked when asynchronous image tracking configuration completes.

The bool parameter is true if configuration succeeded and the system is ready to track the configured image references, or false if configuration failed or was canceled.

A pending configuration may be canceled if the ARTrackedImageManager is disabled, which stops configuration altogether, or if a new configuration process is started, which cancels and replaces the previous one.

OnImageTrackingLost

Action OnImageTrackingLost

This event is raised if image tracking encounters an internal failure, causing it to stop and invalidating the current configuration.

In this case, restoring image tracking requires restarting the subsystem. Note: This event may be raised while the ARTrackedImageManager is disabled.

Public functions

TryGetMarkerData

bool TryGetMarkerData(
  TrackableId marker,
  out XRMarkerDictionary dictionary,
  out int markId
)

Try to get the XRMarkerDictionary and the id from the dictionary of a marker image.

Details
Parameters
marker
The TrackableId which represents a marker ARTrackedImage.
dictionary
The XRMarkerDictionary it belongs to.
markId
The id from the dictionary .
Returns
True if it gets marker data successfully.

TryGetQrCodeData

bool TryGetQrCodeData(
  TrackableId qrCode,
  out string decodedData
)

Try to get the decoded data from a QR code image.

Details
Parameters
qrCode
The TrackableId which represents a QR Code ARTrackedImage.
decodedData
The decoded QR code data.
Returns
true, if it succeed to get QR Code data and decodedData contains valid data.