androidx.xr.runtime


Classes

Config

Defines a configuration state of all available features to be set at runtime.

Config.AnchorPersistenceMode

Feature that allows Anchor's to be peristed through sessions.

Config.DepthEstimationMode

Feature that allows more accurate information about scene depth and meshes.

Config.HandTrackingMode

Feature that allows tracking of the user's hands and hand joints.

Config.HeadTrackingMode

Feature that allows tracking of the user's head pose.

Config.PlaneTrackingMode

Feature that allows tracking of and provides information about scene planes.

CoreState

Represents the state of the XR system at a specific point in time.

Session

A session is the main entrypoint to features provided by ARCore for Jetpack XR.

SessionConfigureConfigurationNotSupported

Result of an unsuccessful Session.configure call.

SessionConfigurePermissionsNotGranted

Result of an unsuccessful Session.configure call.

SessionConfigureResult

Result of a Session.configure call.

SessionConfigureSuccess

Result of a successful Session.configure call.

SessionCreatePermissionsNotGranted

Result of an unsuccessful Session.create call.

SessionCreateResult

Result of a Session.create call.

SessionCreateSuccess

Result of a successful Session.create call.

SessionResumePermissionsNotGranted

Result of an unsuccessful Session.resume call.

SessionResumeResult

Result of a Session.resume call.

SessionResumeSuccess

Result of a successful Session.resume call.

TrackingState

Describes the state of the tracking performed.

Enums

HandJointType

Represents the type of hand joint.

Top-level properties summary

String

Allows an application to get approximate eye gaze.

String

Allows an application to get precise eye gaze data.

String

Allows an application to get face tracking data.

String

Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}: This device supports OpenXR.

String

Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}: This device supports the Android XR Spatial APIs.

String

Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}: This device supports XR input from XR controllers.

String

Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}: This device supports XR input from the user's eye gaze.

String

Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}: This device supports XR input from the user's hands.

String

Allows an application to get hand tracking data.

String

Allows an application to get head tracking data.

String

Application or Activity level {@link android.content.pm.PackageManager.Property PackageManager.Property} for an app to inform the system of the activity launch mode in XR.

String

Application and Activity level {@link android.content.pm.PackageManager.Property PackageManager.Property} for an app to inform the system of the type of safety boundary recommended for the activity.

String

Application and Activity level {@link android.content.pm.PackageManager.Property PackageManager.Property} to inform the system if it should play a system provided default animation when the app requests to enter or exit managed full space mode in XR.

String

Allows an application to get data derived by sensing the user's environment.

String

Allows an application to get highly precise data derived by sensing the user's environment, such as a depth map.

String

Defines the value to launch an activity in managed full space mode in XR, where the system is rendering the activity from a scene graph.

String

Defines the value to launch an activity in unmanaged full space mode in XR, where the activity itself is rendering the space and controls its own scene graph.

String

Defines the value to launch an activity in home space mode in XR.

String

The default value if not specified.

String

Defines the value to launch an activity with a large boundary recommended.

String

Defines the value to launch an activity with no recommendations for the type of safety boundary.

String

Used for permissions that are associated with accessing XR tracked information about the person using the device and the environment around them.

String

Used for permissions that are associated with accessing particularly sensitive XR tracking data.

Top-level properties

EYE_TRACKING_COARSE

val EYE_TRACKING_COARSEString

Allows an application to get approximate eye gaze.

Protection level: dangerous

EYE_TRACKING_FINE

val EYE_TRACKING_FINEString

Allows an application to get precise eye gaze data.

Protection level: dangerous

FACE_TRACKING

val FACE_TRACKINGString

Allows an application to get face tracking data.

Protection level: dangerous

FEATURE_XR_API_OPENXR

val FEATURE_XR_API_OPENXRString

Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}: This device supports OpenXR. The feature version indicates the highest version of OpenXR supported by the device using the following encoding:

  • Major version in bits 31-16
  • Minor version in bits 15-0

This is the same encoding as the top 32 bits of an {@code XrVersion}.

Example: OpenXR 1.1 support is encoded as 0x00010001.

FEATURE_XR_API_SPATIAL

val FEATURE_XR_API_SPATIALString

Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}: This device supports the Android XR Spatial APIs. The feature version indicates the highest version of the Android XR Spatial APIs supported by the device.

Also see Develop with the Android XR SDK.

FEATURE_XR_INPUT_CONTROLLER

val FEATURE_XR_INPUT_CONTROLLERString

Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}: This device supports XR input from XR controllers.

FEATURE_XR_INPUT_EYE_TRACKING

val FEATURE_XR_INPUT_EYE_TRACKINGString

Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}: This device supports XR input from the user's eye gaze.

FEATURE_XR_INPUT_HAND_TRACKING

val FEATURE_XR_INPUT_HAND_TRACKINGString

Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}: This device supports XR input from the user's hands.

HAND_TRACKING

val HAND_TRACKINGString

Allows an application to get hand tracking data.

Protection level: dangerous

HEAD_TRACKING

val HEAD_TRACKINGString

Allows an application to get head tracking data. Unmanaged activities (OpenXR activities with the manifest property "android.window.PROPERTY_XR_ACTIVITY_START_MODE" set to "XR_ACTIVITY_START_MODE_FULL_SPACE_UNMANAGED") do not require this permission to get head tracking data.

{@see https://developer.android.com/develop/xr/get-started#property_activity_xr_start_mode_property}

Protection level: dangerous

PROPERTY_XR_ACTIVITY_START_MODE

val PROPERTY_XR_ACTIVITY_START_MODEString

Application or Activity level {@link android.content.pm.PackageManager.Property PackageManager.Property} for an app to inform the system of the activity launch mode in XR. When it is declared at the application level, all activities are set to the defined value, unless it is overridden at the activity level.

The default value is {@link #XR_ACTIVITY_START_MODE_UNDEFINED}.

The available values are:

  • {@link #XR_ACTIVITY_START_MODE_FULL_SPACE_UNMANAGED}
  • {@link #XR_ACTIVITY_START_MODE_FULL_SPACE_MANAGED}
  • {@link #XR_ACTIVITY_START_MODE_HOME_SPACE}
  • {@link #XR_ACTIVITY_START_MODE_UNDEFINED}

Syntax:

<application>
<property
    android:name="android.window.PROPERTY_ACTIVITY_XR_START_MODE"
    android:value="XR_ACTIVITY_START_MODE_FULL_SPACE_UNMANAGED|
                   XR_ACTIVITY_START_MODE_FULL_SPACE_MANAGED|
                   XR_ACTIVITY_START_MODE_HOME_SPACE|
                   XR_ACTIVITY_START_MODE_UNDEFINED"/>
</application>

PROPERTY_XR_BOUNDARY_TYPE_RECOMMENDED

val PROPERTY_XR_BOUNDARY_TYPE_RECOMMENDEDString

Application and Activity level {@link android.content.pm.PackageManager.Property PackageManager.Property} for an app to inform the system of the type of safety boundary recommended for the activity. When it is declared at the application level, all activities are set to the defined value, unless it is overridden at the activity level. When not declared, the system will not enforce any recommendations for a type of safety boundary and will continue to use the type that is currently in use.

The default value is {@link #XR_BOUNDARY_TYPE_NO_RECOMMENDATION}.

The available values are:

  • {@link #XR_BOUNDARY_TYPE_LARGE}
  • {@link #XR_BOUNDARY_TYPE_NO_RECOMMENDATION}

Syntax:

<application>
<property
    android:name="android.window.PROPERTY_XR_BOUNDARY_TYPE_RECOMMENDED"
    android:value="XR_BOUNDARY_TYPE_LARGE|
                   XR_BOUNDARY_TYPE_NO_RECOMMENDATION"/>
</application>

PROPERTY_XR_USES_CUSTOM_FULL_SPACE_MANAGED_ANIMATION

val PROPERTY_XR_USES_CUSTOM_FULL_SPACE_MANAGED_ANIMATIONString

Application and Activity level {@link android.content.pm.PackageManager.Property PackageManager.Property} to inform the system if it should play a system provided default animation when the app requests to enter or exit managed full space mode in XR. When set to {@code true}, the system provided default animation is not played and the app is responsible for playing a custom enter or exit animation. When it is declared at the application level, all activities are set to the defined value, unless it is overridden at the activity level.

The default value is {@code false}.

Syntax:

<application>
<property
    android:name="android.window.PROPERTY_XR_USES_CUSTOM_FULL_SPACE_MANAGED_ANIMATION"
    android:value="false|true"/>
</application>

SCENE_UNDERSTANDING_COARSE

val SCENE_UNDERSTANDING_COARSEString

Allows an application to get data derived by sensing the user's environment.

Protection level: dangerous

SCENE_UNDERSTANDING_FINE

val SCENE_UNDERSTANDING_FINEString

Allows an application to get highly precise data derived by sensing the user's environment, such as a depth map.

Protection level: dangerous

XR_ACTIVITY_START_MODE_FULL_SPACE_MANAGED

val XR_ACTIVITY_START_MODE_FULL_SPACE_MANAGEDString

Defines the value to launch an activity in managed full space mode in XR, where the system is rendering the activity from a scene graph.

XR_ACTIVITY_START_MODE_FULL_SPACE_UNMANAGED

val XR_ACTIVITY_START_MODE_FULL_SPACE_UNMANAGEDString

Defines the value to launch an activity in unmanaged full space mode in XR, where the activity itself is rendering the space and controls its own scene graph. This should be used for all activities that use OpenXR to render.

XR_ACTIVITY_START_MODE_HOME_SPACE

val XR_ACTIVITY_START_MODE_HOME_SPACEString

Defines the value to launch an activity in home space mode in XR.

XR_ACTIVITY_START_MODE_UNDEFINED

val XR_ACTIVITY_START_MODE_UNDEFINEDString

The default value if not specified. If used, the actual launching mode will be determined by the system based on the launching activity's current mode and the launching flags. When {@link #PROPERTY_XR_ACTIVITY_START_MODE} is used at the application level, apps can use this value to reset at individual activity level.

XR_BOUNDARY_TYPE_LARGE

val XR_BOUNDARY_TYPE_LARGEString

Defines the value to launch an activity with a large boundary recommended. This is useful for activities which expect users to be moving around. The system will ask the user to use a larger size for their safety boundary and check that their space is clear, if the larger size is not already in use. This larger size will be determined by the system.

XR_BOUNDARY_TYPE_NO_RECOMMENDATION

val XR_BOUNDARY_TYPE_NO_RECOMMENDATIONString

Defines the value to launch an activity with no recommendations for the type of safety boundary. The system will continue to use the type of safety boundary that is currently in use.

XR_TRACKING

val XR_TRACKINGString

Used for permissions that are associated with accessing XR tracked information about the person using the device and the environment around them.

XR_TRACKING_SENSITIVE

val XR_TRACKING_SENSITIVEString

Used for permissions that are associated with accessing particularly sensitive XR tracking data.