The Android XR SDK is now available in Developer Preview. We want your feedback! Visit our
support page to reach out.
Stay organized with collections
Save and categorize content based on your preferences.
AndroidXRRuntimeImageLibrary
Constructs a RuntimeReferenceImageLibrary which stores reference images for Marker Tracking and QR Code trackng at Android XR devices.
Summary
Inheritance
Inherits from:
RuntimeReferenceImageLibrary
Properties
|
QRCodeReference
|
XRReferenceImage
Gets QR Code reference image, or null if it's not found from the library.
|
Public static functions
|
IsMarkerReference(XRReferenceImage image)
|
bool
Determine if the given reference image is a marker reference.
|
IsQrCodeReference(XRReferenceImage image)
|
bool
Determine if the given reference image is a QR code reference.
|
ValidateMarker(IReferenceImageLibrary imageLibrary)
|
void
Validate marker configuration with a given XRReferenceImageLibrary.
|
ValidateQrCode(IReferenceImageLibrary imageLibrary)
|
void
Validate QR code configuration with a given XRReferenceImageLibrary.
|
Public attributes
MarkerReferenceCount
int MarkerReferenceCount => _markerCount
Gets the count of marker reference images.
It can be used to iterate all marker reference images starting from MarkerReferenceIndex.
MarkerReferenceIndex
int MarkerReferenceIndex => _markerIndex
Gets the index of the first marker reference image.
Or return -1 if it doesn't exist.
QrCodeReferenceIndex
int QrCodeReferenceIndex => _qrCodeIndex
Gets the index of QR Code reference image.
Or return -1 if it doesn't exist.
count
override int count => _images.Count
Properties
QRCodeReference
XRReferenceImage QRCodeReference
Gets QR Code reference image, or null
if it's not found from the library.
Public functions
AndroidXRRuntimeImageLibrary
AndroidXRRuntimeImageLibrary(
XRReferenceImageLibrary library
)
Constructs a AndroidXRRuntimeImageLibrary from a given XRReferenceImageLibrary
Details |
Parameters |
library
|
The XRReferenceImageLibrary to collect images from.
|
|
Public static functions
IsMarkerReference
bool IsMarkerReference(
XRReferenceImage image
)
Determine if the given reference image is a marker reference.
Details |
Parameters |
|
Returns
|
true , if it's a valid marker reference.
|
IsQrCodeReference
bool IsQrCodeReference(
XRReferenceImage image
)
Determine if the given reference image is a QR code reference.
Details |
Parameters |
image
|
The reference image with QR code name.
|
|
Returns
|
true , if it's a valid QR code reference.
|
ValidateMarker
void ValidateMarker(
IReferenceImageLibrary imageLibrary
)
Validate marker configuration with a given XRReferenceImageLibrary.
It may be updated through XRMarkerDatabase or manually added marker references where the XRReferenceImage.name matchs format "{}-{markId}".
ValidateQrCode
void ValidateQrCode(
IReferenceImageLibrary imageLibrary
)
Validate QR code configuration with a given XRReferenceImageLibrary.
Note: only one reference is needed for QR code tracking, where the XRReferenceImage.name starts with QRCode
, case insensitive.
Details |
Parameters |
imageLibrary
|
The XRReferenceImageLibrary with QR code reference in it.
|
|
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-06-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-26 UTC."],[],[],null,["# AndroidXRRuntimeImageLibrary Class Reference\n\nAndroidXRRuntimeImageLibrary\n============================\n\nConstructs a RuntimeReferenceImageLibrary which stores reference images for Marker Tracking and QR Code trackng at Android XR devices.\n\nSummary\n-------\n\n### Inheritance\n\nInherits from: `RuntimeReferenceImageLibrary`\n\n| ### Constructors and Destructors ||\n|---|---|\n| [AndroidXRRuntimeImageLibrary](#androidxrruntimeimagelibrary)`(XRReferenceImageLibrary library)` Constructs a [AndroidXRRuntimeImageLibrary](/develop/xr/unity/reference/class/Google/XR/Extensions/AndroidXRRuntimeImageLibrary#classGoogle_1_1XR_1_1Extensions_1_1AndroidXRRuntimeImageLibrary) from a given XRReferenceImageLibrary ||\n\n| ### Public attributes ||\n|-----------------------------------------------------------------|-----------------------------------------------------------|\n| [MarkerReferenceCount](#markerreferencecount)` =\u003e _markerCount` | `int` Gets the count of marker reference images. |\n| [MarkerReferenceIndex](#markerreferenceindex)` =\u003e _markerIndex` | `int` Gets the index of the first marker reference image. |\n| [QrCodeReferenceIndex](#qrcodereferenceindex)` =\u003e _qrCodeIndex` | `int` Gets the index of QR Code reference image. |\n| [count](#count)` =\u003e _images.Count` | `override int` |\n\n| ### Properties ||\n|-------------------------------------|------------------------------------------------------------------------------------------------|\n| [QRCodeReference](#qrcodereference) | `XRReferenceImage` Gets QR Code reference image, or `null` if it's not found from the library. |\n\n| ### Public static functions ||\n|--------------------------------------------------------------------------|-----------------------------------------------------------------------------|\n| [IsMarkerReference](#ismarkerreference)`(XRReferenceImage image)` | `bool` Determine if the given reference image is a marker reference. |\n| [IsQrCodeReference](#isqrcodereference)`(XRReferenceImage image)` | `bool` Determine if the given reference image is a QR code reference. |\n| [ValidateMarker](#validatemarker)`(IReferenceImageLibrary imageLibrary)` | `void` Validate marker configuration with a given XRReferenceImageLibrary. |\n| [ValidateQrCode](#validateqrcode)`(IReferenceImageLibrary imageLibrary)` | `void` Validate QR code configuration with a given XRReferenceImageLibrary. |\n\nPublic attributes\n-----------------\n\n### MarkerReferenceCount\n\n```c#\nint MarkerReferenceCount =\u003e _markerCount\n``` \nGets the count of marker reference images.\n\nIt can be used to iterate all marker reference images starting from [MarkerReferenceIndex](/develop/xr/unity/reference/class/Google/XR/Extensions/AndroidXRRuntimeImageLibrary#markerreferenceindex). \n\n### MarkerReferenceIndex\n\n```c#\nint MarkerReferenceIndex =\u003e _markerIndex\n``` \nGets the index of the first marker reference image.\n\nOr return -1 if it doesn't exist. \n\n### QrCodeReferenceIndex\n\n```c#\nint QrCodeReferenceIndex =\u003e _qrCodeIndex\n``` \nGets the index of QR Code reference image.\n\nOr return -1 if it doesn't exist. \n\n### count\n\n```c#\noverride int count =\u003e _images.Count\n``` \n\nProperties\n----------\n\n### QRCodeReference\n\n```c#\nXRReferenceImage QRCodeReference\n``` \nGets QR Code reference image, or `null` if it's not found from the library.\n\nPublic functions\n----------------\n\n### AndroidXRRuntimeImageLibrary\n\n```c#\n AndroidXRRuntimeImageLibrary(\n XRReferenceImageLibrary library\n)\n``` \nConstructs a [AndroidXRRuntimeImageLibrary](/develop/xr/unity/reference/class/Google/XR/Extensions/AndroidXRRuntimeImageLibrary#classGoogle_1_1XR_1_1Extensions_1_1AndroidXRRuntimeImageLibrary) from a given XRReferenceImageLibrary\n\n\n| Details ||\n|------------|-----------------------------------------------------------------------------------------------------------------------------------------|\n| Parameters | |-----------|-----------------------------------------------------| | `library` | The XRReferenceImageLibrary to collect images from. | |\n\nPublic static functions\n-----------------------\n\n### IsMarkerReference\n\n```c#\nbool IsMarkerReference(\n XRReferenceImage image\n)\n``` \nDetermine if the given reference image is a marker reference.\n\n\n| Details ||\n|-------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Parameters | |---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `image` | The reference image with marker name or generated from [XRMarkerDatabase](/develop/xr/unity/reference/class/Google/XR/Extensions/XRMarkerDatabase#classGoogle_1_1XR_1_1Extensions_1_1XRMarkerDatabase). | |\n| **Returns** | `true`, if it's a valid marker reference. |\n\n### IsQrCodeReference\n\n```c#\nbool IsQrCodeReference(\n XRReferenceImage image\n)\n``` \nDetermine if the given reference image is a QR code reference.\n\n\n| Details ||\n|-------------|-----------------------------------------------------------------------------------------------------------|\n| Parameters | |---------|----------------------------------------| | `image` | The reference image with QR code name. | |\n| **Returns** | `true`, if it's a valid QR code reference. |\n\n### ValidateMarker\n\n```c#\nvoid ValidateMarker(\n IReferenceImageLibrary imageLibrary\n)\n``` \nValidate marker configuration with a given XRReferenceImageLibrary.\n\nIt may be updated through [XRMarkerDatabase](/develop/xr/unity/reference/class/Google/XR/Extensions/XRMarkerDatabase#classGoogle_1_1XR_1_1Extensions_1_1XRMarkerDatabase) or manually added marker references where the XRReferenceImage.name matchs format \"{}-{markId}\".\n\n\n| Details ||\n|------------|-----------------------------------------------|\n| Parameters | |----------------|---| | `imageLibrary` | | |\n\n### ValidateQrCode\n\n```c#\nvoid ValidateQrCode(\n IReferenceImageLibrary imageLibrary\n)\n``` \nValidate QR code configuration with a given XRReferenceImageLibrary.\n\nNote: only one reference is needed for QR code tracking, where the XRReferenceImage.name starts with `QRCode`, case insensitive.\n\n\n| Details ||\n|------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Parameters | |----------------|-----------------------------------------------------------| | `imageLibrary` | The XRReferenceImageLibrary with QR code reference in it. | |"]]