XR_ANDROID_enumerate_system_extension_properties
Name String
XR_ANDROID_enumerate_system_extension_properties
Extension Type
Instance extension
Registered Extension Number
725
Revision
1
Ratification Status
Not ratified
Extension and Version Dependencies
Last Modified Date
2026-02-11
IP Status
No known IP claims.
Contributors
Spencer Quin, Google
Nihav Jain, Google
Kenny Vercaemer, Google
Overview
This extension allows applications to determine which extensions are supported by the current system configuration. Even if an extension is supported by the runtime, it may not be supported by the present system hardware.
The XrSystemExtensionPropertiesANDROID structure is defined as:
typedef struct XrSystemExtensionPropertiesANDROID {
XrStructureType type;
void* next;
XrExtensionProperties properties;
XrBool32 isSupported;
} XrSystemExtensionPropertiesANDROID;
Member Descriptions
typeis the XrStructureType of this structure.nextisNULLor a pointer to the next structure in a structure chain.propertiesis the XrExtensionProperties with the extension name.isSupportedis a boolean indicating whether the extension is currently supported by the system.
Valid Usage (Implicit)
- The
XR_ANDROID_enumerate_system_extension_propertiesextension must be enabled prior to using XrSystemExtensionPropertiesANDROID -
typemust beXR_TYPE_SYSTEM_EXTENSION_PROPERTIES_ANDROID -
nextmust beNULLor a valid pointer to the next structure in a structure chain
The XrEventDataSystemPropertiesChangedANDROID structure is defined as:
typedef struct XrEventDataSystemPropertiesChangedANDROID {
XrStructureType type;
const void* next;
} XrEventDataSystemPropertiesChangedANDROID;
Member Descriptions
typeis the XrStructureType of this structure.nextisNULLor a pointer to the next structure in a structure chain.
The runtime must queue this event when the system extension properties have changed. For example when new peripherals are connected enabling new functionality.
All calls to xrEnumerateSystemExtensionPropertiesANDROID must return the same values until a new XrEventDataSystemPropertiesChangedANDROID event is queued.
When an application receives this event, it should call xrEnumerateSystemExtensionPropertiesANDROID again to determine the latest system extension properties, possibly creating or destroying trackers associated with those extensions as needed.
Valid Usage (Implicit)
- The
XR_ANDROID_enumerate_system_extension_propertiesextension must be enabled prior to using XrEventDataSystemPropertiesChangedANDROID -
typemust beXR_TYPE_EVENT_DATA_SYSTEM_PROPERTIES_CHANGED_ANDROID -
nextmust beNULLor a valid pointer to the next structure in a structure chain
The xrEnumerateSystemExtensionPropertiesANDROID function is defined as:
XrResult xrEnumerateSystemExtensionPropertiesANDROID(
XrInstance instance,
XrSystemId systemId,
uint32_t propertyCapacityInput,
uint32_t* propertyCountOutput,
XrSystemExtensionPropertiesANDROID* properties);
Parameter Descriptions
instanceis a valid XrInstance .systemIdis a valid sliink:XrSystemId of the system to retrieve the extension properties for.propertyCapacityInputis the capacity of thepropertiesarray, or 0 to indicate a request to retrieve the required capacity.propertyCountOutputis the number of requested extension properties.propertiesis an array of XrSystemExtensionPropertiesANDROID structures. It can beNULLifpropertyCapacityInputis 0.- See the Buffer Size Parameters section for a detailed description of retrieving the required
propertiessize.
Valid Usage (Implicit)
- The
XR_ANDROID_enumerate_system_extension_propertiesextension must be enabled prior to calling xrEnumerateSystemExtensionPropertiesANDROID -
instancemust be a valid XrInstance handle -
propertyCountOutputmust be a pointer to auint32_tvalue - If
propertyCapacityInputis not0,propertiesmust be a pointer to an array ofpropertyCapacityInputXrSystemExtensionPropertiesANDROID structures
Return Codes
XR_SUCCESS
XR_ERROR_FUNCTION_UNSUPPORTEDXR_ERROR_HANDLE_INVALIDXR_ERROR_INSTANCE_LOSTXR_ERROR_RUNTIME_FAILUREXR_ERROR_SYSTEM_INVALIDXR_ERROR_VALIDATION_FAILURE
Example
XrInstance instance; // XrInstance previously created
XrSystemId systemId; // XrSystemId from a previously created instance
PFN_xrEnumerateSystemExtensionPropertiesANDROID xrEnumerateSystemExtensionPropertiesANDROID;
// Poll events for recommended resolution changes.
XrEventDataBuffer event = {XR_TYPE_EVENT_DATA_BUFFER};
XrResult result = xrPollEvent(instance, &event);
if (result == XR_SUCCESS) {
switch (event.type) {
case XR_TYPE_EVENT_DATA_SYSTEM_PROPERTIES_CHANGED_ANDROID:
// It's possible that the system was lost and a new id will be returned
XrSystemId newSystemId;
XrSystemGetInfo getInfo = {XR_TYPE_SYSTEM_GET_INFO};
getInfo.formFactor = XR_FORM_FACTOR_HEAD_MOUNTED_DISPLAY;
if(XR_SUCCESS == xrGetSystem(instance, &getInfo, &newSystemId)) {
if(systemId != newSystemId) {
//Do things like recreate the session
systemId = newSystemId;
}
}
// Enumerate the extensions to see which ones are now supported based on hardware changes
uint32_t extensionsCount;
xrEnumerateSystemExtensionPropertiesANDROID(instance, systemId, 0, &extensionsCount, NULL);
std::vector<XrSystemExtensionPropertiesANDROID> properties(extensionsCount,
{.type = XR_TYPE_SYSTEM_EXTENSION_PROPERTIES_ANDROID});
XrResult result = xrEnumerateSystemExtensionPropertiesANDROID(
instance,
systemId,
extensionsCount,
&extensionsCount,
properties.data()
);
// Do something based on which extensions are now supported by the system
break;
}
}
PFN_xrEnumerateSystemExtensionPropertiesANDROID xrEnumerateSystemExtensionPropertiesANDROID;
XrInstance instance;
XrInstanceCreateInfo createInfo = {XR_TYPE_INSTANCE_CREATE_INFO};
// Initialize the createInfo with appropriate values for the application
CHK_XR(xrCreateInstance(&createInfo, &instance));
// Get the systemId for the system.
XrSystemId systemId;
XrSystemGetInfo getInfo = {XR_TYPE_SYSTEM_GET_INFO};
getInfo.formFactor = XR_FORM_FACTOR_HEAD_MOUNTED_DISPLAY;
CHK_XR(xrGetSystem(instance, &getInfo, &systemId));
// Enumerate the system extension properties.
uint32_t extensionsCount;
xrEnumerateSystemExtensionPropertiesANDROID(instance, systemId, 0, &extensionsCount, NULL);
std::vector<XrSystemExtensionPropertiesANDROID> properties(extensionsCount,
{.type = XR_TYPE_SYSTEM_EXTENSION_PROPERTIES_ANDROID});
XrResult result = xrEnumerateSystemExtensionPropertiesANDROID(
instance,
systemId,
extensionsCount,
&extensionsCount,
properties.data()
);
Issues
Version History
Revision 1, 2026-03-17 (Kenny Vercaemer)
- Initial extension version.