Start native apps faster with the Composables CLI ->
Interface

SpatialConfiguration

Provides information and functionality related to the spatial configuration of the application.

Source set: Android
public sealed interface SpatialConfiguration

Provides information and functionality related to the spatial configuration of the application.

Properties

bounds

Source set: Android
public val bounds: DpVolumeSize

A volume whose width, height, and depth represent the space available to the application.

In XR, an application's available space is not related to the display or window dimensions; instead, it will always be some subset of the virtual 3D space. The app bounds will change when switching between home space or full space modes.

In non-XR environments, the width and height will represent the screen width and height available to the application (see android.content.res.Configuration.screenWidthDp and android.content.res.Configuration.screenHeightDp) and the depth will be zero.

This is a state-based value that will trigger recomposition.

hasXrSpatialFeature

Source set: Android
public val hasXrSpatialFeature: Boolean

XR Spatial APIs are supported for this system. This is equivalent to PackageManager.hasSystemFeature(FEATUREXRSPATIAL, version) where version is the minimum version for features available in the XR Compose library used.

Last updated: