2024-12-11@07PM
ARCore for Jetpack XR: v1.0.0-alpha01
December 12, 2024
androidx.xr.arcore:arcore-* 1.0.0-alpha01
is released.
Features of initial release
Inspired by the existing ARCore library, the ARCore for Jetpack XR library provides capabilities for blending digital content with the real world. This library includes motion tracking, persistent anchors, hit testing, and plane identification with semantic labeling (for example, floor, walls, and tabletops). View the developer guide to learn more about working with ARCore for Jetpack XR.
Session
: ARCore for Jetpack XR uses the Jetpack XR Runtime under-the-hood to power its functionality. You will use a Session to interact with most ARCore for Jetpack XR APIs, so please take a look at its documentation.Plane
: Use planes to understand the world around you. Each plane has aLabel
that describes it semantically. You can usesubscribe
to be notified about the latest detected planes orstate
to be notified about the changes to a specific plane.Anchor
: A link between a virtual object and a real world location. Anchors can be attached to a specific location in space (usingcreate
) or aTrackable
(usingcreateAnchor
).Anchors can be reused across sessions. You can use
persist
to store them,getPersistedAnchorUuids
to enumerate them andload
to retrieve them. Make sure that youunpersist
them once they are no longer in use.Anchors are interoperable between ARCore for Jetpack XR and Jetpack SceneCore. You can create an
AnchorEntity
using an anchor or, if you have an existing AnchorEntity, you can usegetAnchor
to retrieve its backing anchor.Offer natural user interactions using
hitTest
. A hitTest uses aRay
to determine which contents it intersects and to create anAnchor
from that location. Consider conducting a hitTest from anInputEvent
.
Known Issues
There might be a delay between calling
unpersist
and its UUID being removed from the results returned bygetPersistedAnchorUuids
.create
will not validate that the system has enough resources to return new anchors. Creating an excessive amount of anchors might lead to a crash.Persisting an Anchor that was previously persisted and unpersisted is not currently supported.
Usage in the emulator is supported, but the behavior might not be as stable as when running on an actual device. Particularly, calls to
create
might fail with a native code error and immediately terminate the activity.In certain circumstances, a
RuntimeException
might be erroneously thrown when callingpersist
with the message “Anchor was not persisted”. In those circumstances, the function would still succeed and the anchor will be persisted. We recommend wrapping the call topersist
with atry
block as a workaround.
Jetpack Compose for XR: v1.0.0-alpha01
December 12, 2024
androidx.xr.compose:compose-*1.0.0-alpha01
is released.
Features of Initial Release
Initial developer release of Jetpack Compose for XR. Use familiar Compose concepts such as rows and columns to create spatial UI layouts in XR, whether you're porting an existing 2D app to XR or creating a new XR app from scratch. This library provides subspace and spatial composables: such as spatial panels and orbiters, which let you place your existing 2D Compose or Views-based UI in a spatial layout. It introduces the Volume subspace composable, which allows you to place SceneCore entities, such as 3D models, relative to your UI. Learn more in this developer guide:
Subspace
: This composable can be placed anywhere within your app’s UI hierarchy, allowing you to maintain layouts for 2D and spatial UI without losing context between files. This makes it easier to share things like existing app architecture between XR and other form factors without needing to hoist state through your whole UI tree or re-architect your app.SpatialPanel: A spatial panel is a subspace composable that lets you display app content–for example, you could display video playback, still images, or any other content in a spatial panel.
Orbiter: An orbiter is a spatial UI component. It's designed to be attached to a corresponding spatial panel, and contains navigation and contextual action items related to that spatial panel. For example, if you've created a spatial panel to display video content, you could add video playback controls inside an orbiter.
Volume: Place SceneCore entities, such as 3D models, relative to your UI.
Spatial Layout: You can create multiple spatial panels and place them within a Spatial Layout using
SpatialRow
,SpatialColumn
,SpatialBox
, andSpatialLayoutSpacer
. UseSubspaceModifier
s to customize your layout.Spatial UI components: These elements can be reused in your 2D UI, and their spatial attributes will only be visible when spatial capabilities are enabled.
SpatialDialog
: Panel will push slightly back in z-depth to display an elevated dialog.SpatialPopUp
: Panel will push slightly back in z-depth to display an elevated popupSpatialElevation
:SpatialElevationLevel
can be set to add elevation.
SpatialCapabilities: Spatial capabilities can change as users interact with your app or the system, or can even be changed by your app itself—for example, moving into Home Space or Full Space. To avoid issues, your app needs to check for
LocalSpatialCapabilities.current
to determine which APIs are supported in the current environment.isSpatialUiEnabled
: Spatial UI elements (e.g. SpatialPanel)isContent3dEnabled
: 3D objectsisAppEnvironmentEnabled
: The environmentisPassthroughControlEnabled
: Whether or not the application can control the passthrough stateisSpatialAudioEnabled
: Spatial audio
Known Issues
- Currently a minSDK of 30 is required to use Jetpack Compose for XR. As a workaround you may add the following manifest entry
<uses-sdk tools:overrideLibrary="androidx.xr.scenecore, androidx.xr.compose"/>
to be able to build and run with a minSDK of 23. - Jetpack XR apps currently require requesting
android.permission.SCENE_UNDERSTANDING
permission in the AndroidManifest. - When an app launches directly into Full Space using the
PROPERTY_XR_ACTIVITY_START_MODE
property in their manifest, Activities/Applications are initially opened in Home Space before transitioning into Full Space. - glTFs in Volume Composables may initially flicker at the wrong location.
- Using a SpatialDialog in a panel that has been moved significantly will push the content in the wrong direction.
Material Design for XR: v1.0.0-alpha01
December 12, 2024
androidx.xr.compose.material3:material3:1.0.0-alpha01
is released.
Features of Initial Release
Initial developer release of Material Design for XR. Using the existing Material 3 library, components and adaptive layouts are enhanced with spatial UI behaviors. You can build directly with M3 XR components, or adapt your current implementation by adding the EnableXrComponentOverrides
wrapper. Learn more in this developer guide.
Supported XR adaptations:
Navigation rail in any Compose layout, including
NavigationSuiteScaffold
will automatically adapt to XR Orbiter. For more information, read Material Design guidelines.Navigation bar in any Compose layout, including
NavigationSuiteScaffold
will automatically adapt to XR Orbiter. For more information, read Material Design guidelines.
Known Issues
- ListDetailPaneScaffold and SupportingPaneScaffold currently don’t support multiple spatial panels
Jetpack SceneCore: v1.0.0-alpha01
December 12, 2024
androidx.xr.scenecore:scenecore-* 1.0.0-alpha01
is released.
Features of Initial Release Initial developer release of Jetpack SceneCore, a 3D scene graph library for creating and manipulating immersive scenes and environments. This library allows you to place and arrange 3D models and content panels relative to each other and your virtual or real-world environments.
- SpatialEnvironment: Create fully immersive experiences with a skybox image and/or 3D model geometry as the backdrop for your XR scene of your environment. Or enable passthrough, so your virtual scene can integrate with the user’s real-world environment.
- PanelEntity: Add 2D content to your 3D scenes by embedding standard Android layouts and Activities into spatialized panels that can float or be anchored to real-world surfaces.
- GltfModelEntity: Place, animate, and interact with 3D models in your scene. SceneCore supports the glTF file format for ease of integration with existing models.
- SpatialAudio: Add ambient and point audio sources into your 3D scene for fully immersive, spatialized sound.
- StereoSurfaceEntity: SceneCore supports left/right eye routing of content rendered onto an Android Surface. This can be used to render stereoscopic content in a side-by-side or top-bottom format, such as stereo photos, 3D video, or other dynamically rendered UIs. Applications should use MediaPlayer or ExoPlayer for video decoding.
- Component System: SceneCore offers a robust and flexible component system for adding capabilities to your XR content, including affordances for users to move, resize, and interact with models and panels.
- Anchor: With passthrough enabled, you can attach panels and models to actual surfaces, giving users seamless integration of virtual content in their real-world environment.
- User Pose: Access the user’s location in the virtual scene, to orient your content around the user’s position.
- SpatialCapabilities: Build fully adaptive apps that take advantage of spatialized capabilities when available, such as 3D positioning of UI content. Not only that, but your app can monitor for changes to capabilities while the app is executing, to modify the experience based on how the user is using their Android XR device.
Known Issues
- Currently a minSDK of 30 is required to use Jetpack SceneCore. As a workaround add the following manifest entry
<uses-sdk tools:overrideLibrary="androidx.xr.scenecore, androidx.xr.compose"/>
to be able to build and run with a minSDK of 23. - Session can become invalid in various situations that automatically recreate the Activity, including resizing a main panel, connecting peripherals, and changing between light and dark mode. If you encounter session invalidation issues, workarounds include making you main panel non-resizable, using a dynamic panel entity, disabling activity recreation for specific config changes or disabling light/dark mode theme changes.
- Movable and Resizable components are not supported on GltfEntity.
- Entity.getSize() is not supported on GltfEntity.
- Jetpack XR apps required to request
android.permission.SCENE_UNDERSTANDING
permission in AndroidManifest. - Creating a session is only supported on an Android XR device. At this time, if you create a Session and try to use it on a non Android XR device, you'll get a RuntimeException.
- Setting the skybox to null via `SpatialEnvironment.setSpatialEnvironmentPreference() does not result in a solid black skybox as documented. It may result in the system default skybox or no change to the current skybox.
- SceneCore clients should add
implementation(“com.google.guava:listenablefuture-1.0”)
to their Gradle configuration for their app’s dependencies. In a future release, scenecore will include this library as anapi
dependency so clients will not need to explicitly declare it. - SceneCore erroneously includes
com.google.guava:guava-31.1-android
andcom.google.protobuf:protobuf-javalite
as transitive dependencies. If this results in duplicate class errors in your build, these two dependencies can be safely excluded. - If your app uses SceneCore and enables ProGuard, it will crash when you create a Session. As a workaround, disable ProGuard. See this guide for more information on how to enable ProGuard.
XR Runtime: v1.0.0-alpha01
December 12, 2024
androidx.xr.runtime:runtime-* 1.0.0-alpha01
is released.
Features of Initial Release
Initial release of Jetpack XR Runtime. This library contains fundamental pieces of functionality for the Jetpack XR suite of libraries. This includes capability discovery, lifecycle management, configuration, and more. The Runtime library provides different variations (e.g. runtime-openxr
or runtime-testing
) depending on the execution platform. Additionally, this library offers fundamental math abstractions such as Vector3
and Matrix4
that are used across the entire Jetpack XR API surface.
Session
: Provides you with fine-grained controls over the XR system, including deciding when processing is and is not being executed and the overall configuration. It is also the handle that you will use across all other APIs to unlock the underlying system capabilities.Pose
: A location in an arbitrary coordinate system that has a position and orientation associated with it. You will use this class to communicate the location of objects with ARCore for Jetpack XR and Jetpack SceneCore.
Known Issues
configure
is currently a no-op. Future releases will add new settings that you can use to control the behavior of theSession
.
Compose Material3: v1.4.0-alpha05
December 12, 2024
androidx.compose.material3:material3-*:1.4.0-alpha05
is released. Version 1.4.0-alpha05 contains these commits.
API Changes
- Replace type in
WideNavigationRailState.current/target
value for an enum for better readability (I2d6ab) SplitButton
change Shape api from data class to class for binary compatibility. (I53812)- Added a tooltip API that has a
onDismissRequest
parameter so makers can decide what happens when a user clicks outside of the tooltip. Deprecated the old API that doesn't contain this new parameter. (I99aef) - Change naming of
opticalCentering
tohorizontalCenterOptically
. Making the modifier internal. Replace padding parameter with max start and end offset. (I0b904) - Change
WideNavigationRailState
to have current/target value, remove enums in favor of boolean. (Idfa29, b/356039090) - Add
NavigationBarItemComponentOverride
. (I3a06a)
Bug Fixes
- Fix the top and bottom app-bar behaviors to reliably change color when content is scrolled all the way. (Idc4e8, b/293665988)
- Scroll behavior functions for top and bottom app bars now return a remembered behavior to perform better across recompositions. (I0fdbe, b/207957336)
- Modifier pararemeter is now applied after internal modifiers such as dragging behavior and semantics, instead of before. This affects the ordering in which modifiers are applied. (I8d83f)
- Expanded bottom sheet remains expanded on size change. (I2870b, b/324934884)
- Correctly route status and navigation bar flags for windows properties. (Ie674d, b/362539765)
- Move modifier parameter to the scaffolds root, as documented. This aligns implementation with M2. (I0235e, b/372311595)
External Contribution
- Commonized
DatePickerDialog
function. (I7dced)
Compose Material3 Adaptive: v1.1.0-alpha08
December 12, 2024
androidx.compose.material3.adaptive:adaptive-*:1.1.0-alpha08
is released. Version 1.1.0-alpha08 contains these commits.
API Changes
- Introduce
currentWindowDpSize
function. (I99125, b/296300441) - Expose
PaneScaffoldParentData
andThreePaneScaffoldHorizontalOrder.toLtrOrder()
(I2d6b7) - Remove
PaneScaffoldMotionScope
and turn it into a field underPaneScaffoldTransitionScope
. Also rename it toPaneScaffoldMotionDataProvider
and remove the access to the underlying data structure of PaneMotionData - instead, provide getter and looping methods for accessing the data. (Id8884) - Create overriding mechanism for
ThreePaneScaffold
to support sideloading implementations for different form factors. (I5280f) - Makes pane expansion state null by default (Ia65f8, b/376394520)