Stay organized with collections
Save and categorize content based on your preferences.
Interfaces
SpatialCapabilities |
Provides information and functionality related to the spatial capabilities of the application.
|
SpatialConfiguration |
Provides information and functionality related to the spatial configuration of the application.
|
Top-level properties summary
Top-level properties
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-08-13 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-08-13 UTC."],[],[],null,["# androidx.xr.compose.platform\n============================\n\nInterfaces\n----------\n\n|---------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------|\n| [SpatialCapabilities](/reference/kotlin/androidx/xr/compose/platform/SpatialCapabilities) | Provides information and functionality related to the spatial capabilities of the application. |\n| [SpatialConfiguration](/reference/kotlin/androidx/xr/compose/platform/SpatialConfiguration) | Provides information and functionality related to the spatial configuration of the application. |\n\nTop-level properties summary\n----------------------------\n\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [ProvidableCompositionLocal](/reference/kotlin/androidx/compose/runtime/ProvidableCompositionLocal)`\u003c`[Session](/reference/kotlin/androidx/xr/runtime/Session)`?\u003e` | [LocalSession](/reference/kotlin/androidx/xr/compose/platform/package-summary#LocalSession()) A composition local that provides the current Jetpack XR [Session](/reference/kotlin/androidx/xr/runtime/Session). |\n| [ProvidableCompositionLocal](/reference/kotlin/androidx/compose/runtime/ProvidableCompositionLocal)`\u003c`[SpatialCapabilities](/reference/kotlin/androidx/xr/compose/platform/SpatialCapabilities)`\u003e` | [LocalSpatialCapabilities](/reference/kotlin/androidx/xr/compose/platform/package-summary#LocalSpatialCapabilities()) Provides the current [SpatialCapabilities](/reference/kotlin/androidx/xr/compose/platform/SpatialCapabilities) that are currently available to the application. |\n| [ProvidableCompositionLocal](/reference/kotlin/androidx/compose/runtime/ProvidableCompositionLocal)`\u003c`[SpatialConfiguration](/reference/kotlin/androidx/xr/compose/platform/SpatialConfiguration)`\u003e` | [LocalSpatialConfiguration](/reference/kotlin/androidx/xr/compose/platform/package-summary#LocalSpatialConfiguration()) Provides the current [SpatialConfiguration](/reference/kotlin/androidx/xr/compose/platform/SpatialConfiguration). |\n\nTop-level properties\n--------------------\n\n### LocalSession\n\nArtifact: [androidx.xr.compose:compose](/jetpack/androidx/releases/xr-compose) \n[View Source](https://cs.android.com/search?q=file:androidx/xr/compose/platform/LocalSession.kt+symbol:LocalSession) \nAdded in [1.0.0-alpha06](/jetpack/androidx/releases/xr-compose#1.0.0-alpha06) \n\n```\nval LocalSession: ProvidableCompositionLocal\u003cSession?\u003e\n```\n\nA composition local that provides the current Jetpack XR [Session](/reference/kotlin/androidx/xr/runtime/Session).\n\nIn non-XR environments, this composition local will return `null`. \n\n### LocalSpatialCapabilities\n\nArtifact: [androidx.xr.compose:compose](/jetpack/androidx/releases/xr-compose) \n[View Source](https://cs.android.com/search?q=file:androidx/xr/compose/platform/SpatialCapabilities.kt+symbol:LocalSpatialCapabilities) \nAdded in [1.0.0-alpha06](/jetpack/androidx/releases/xr-compose#1.0.0-alpha06) \n\n```\nval LocalSpatialCapabilities: ProvidableCompositionLocal\u003cSpatialCapabilities\u003e\n```\n\nProvides the current [SpatialCapabilities](/reference/kotlin/androidx/xr/compose/platform/SpatialCapabilities) that are currently available to the application.\n\nThe [SpatialCapabilities](/reference/kotlin/androidx/xr/compose/platform/SpatialCapabilities) represents a set of inherent permissions that the application may have depending on the context. For example, in home space mode, the app may not have the ability to create spatial UI; however, in full space mode, the application may have this capability. \n\n### LocalSpatialConfiguration\n\nArtifact: [androidx.xr.compose:compose](/jetpack/androidx/releases/xr-compose) \n[View Source](https://cs.android.com/search?q=file:androidx/xr/compose/platform/SpatialConfiguration.kt+symbol:LocalSpatialConfiguration) \nAdded in [1.0.0-alpha06](/jetpack/androidx/releases/xr-compose#1.0.0-alpha06) \n\n```\nval LocalSpatialConfiguration: ProvidableCompositionLocal\u003cSpatialConfiguration\u003e\n```\n\nProvides the current [SpatialConfiguration](/reference/kotlin/androidx/xr/compose/platform/SpatialConfiguration).\n\nThe behavior of the configuration object will depend on whether the system XR Spatial feature is enabled. For example, if the feature is not enabled, attempting to request different mode types cause an exception."]]