SpatialApiVersionHelper


public static class SpatialApiVersionHelper


Provides the Spatial API version that the device supports.

This object queries the underlying XR platform to determine which Spatial API versions are supported. It loads all available SpatialApiVersionProvider implementations and reports the highest version number found.

Summary

Public fields

static @NonNull SpatialApiVersionHelper

Public methods

static final int

The version of the Android XR Spatial APIs available to Jetpack XR at runtime.

Public fields

INSTANCE

Added in 1.0.0-alpha11
public static @NonNull SpatialApiVersionHelper INSTANCE

Public methods

getSpatialApiVersion

Added in 1.0.0-alpha11
public static final int getSpatialApiVersion()

The version of the Android XR Spatial APIs available to Jetpack XR at runtime.

If the Spatial APIs are available, this value will be one of the constants declared in SpatialApiVersions.

Throws
IllegalStateException

if no SpatialApiVersionProvider service implementation is found.