Jetpack SceneCore
Latest Update | Stable Release | Release Candidate | Beta Release | Alpha Release |
---|---|---|---|---|
July 30, 2025 | - | - | - | 1.0.0-alpha05 |
Declaring dependencies
To add a dependency on XR SceneCore, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.
Add the dependencies for the artifacts you need in the build.gradle
file for
your app or module:
Groovy
dependencies { implementation "androidx.xr.scenecore:scenecore:1.0.0-alpha05" // Required for Java implementation "com.google.guava:listenablefuture:1.0" // Required for Kotlin implementation "org.jetbrains.kotlinx:kotlinx-coroutines-guava:1.9.0" // Use to write unit tests testImplementation "androidx.xr.scenecore:scenecore-testing:1.0.0-alpha05" }
Kotlin
dependencies { implementation("androidx.xr.scenecore:scenecore:1.0.0-alpha05") // Required for Java implementation("com.google.guava:listenablefuture:1.0") // Required for Kotlin implementation("org.jetbrains.kotlinx:kotlinx-coroutines-guava:1.9.0") // Use to write unit tests testImplementation("androidx.xr.scenecore:scenecore-testing:1.0.0-alpha05") }
For more information about dependencies, see Add build dependencies.
Feedback
Your feedback helps make Jetpack better. Let us know if you discover new issues or have ideas for improving this library. Please take a look at the existing issues in this library before you create a new one. You can add your vote to an existing issue by clicking the star button.
See the Issue Tracker documentation for more information.
Version 1.0
Version 1.0.0-alpha05
July 30, 2025
androidx.xr.scenecore:scenecore-guava:1.0.0-alpha05
, androidx.xr.scenecore:scenecore-testing:1.0.0-alpha05
, and androidx.xr.scenecore:scenecore:1.0.0-alpha05
are released. Version 1.0.0-alpha05 contains these commits.
New Features
- Perceived Resolution API added to Panel Entities and
SurfaceEntities
. (I118f6) PerceivedResolution
Callback methods added to Scene.kt to monitor the perceived resolution of the main panel of the activity in HSM. (I58084)SurfaceEntity
- Support added for Application to request super sampling at creation time. This allows applications to use super sampling filter for anti-aliasing. (I06913)- Added
recommendedContentBoxInFullSpace
property toActivitySpace
. It returns a recommended box for content to be placed in when in Full Space Mode. (I4cd6f) - Provided overloaded constructor for movable modifier which allows anchoring. (Ic0c70)
API Changes
Extensive API changes were made to SceneCore
for this release. Several classes have been renamed and/or moved to different modules, and most getter/setter methods have been replaced with Kotlin properties. While we anticipate future breaking API changes until our first Beta release, they will not be as disruptive or numerous.
- Renamed and/or moved the following classes & interfaces:
androidx.xr.scenecore.PixelDimensions
toandroidx.xr.runtime.math.IntSize2d
;androidx.xr.scenecore.Dimensions
toandroidx.xr.runtime.math.FloatSize3d
;androidx.xr.scenecore.ActivityPose
toScenePose
,androidx.xr.scenecore.ContentlessEntity
toGroupEntity
,androidx.xr.scenecore.PlaneType
toPlaneOrientation
;androidx.xr.scenecore.PlaneSemantic
toPlaneSemanticType
. (Ifd405)(I3b622) (If534d) - A number of setters for
Scene
's properties have been made private; they were not intended to be mutated bySceneCore
clients:activitySpace
,activitySpaceRoot
,mainPanelEntity
,perceptionSpace
,spatialCapabilities
,spatialEnvironment
, andspatialUser
. (I2f506) - In Entity: Changed the following to properties:
get/setParent()
,setContentDescription
; DeprecatedEntity.is/setHidden()
, useEntity.is/setEnabled
instead. (Ibc4c6) - Removed the
androidx.xr.scenecore.BasePanelEntity
class, usePanelEntity
directly instead. Replaced getters and setters forPanelEntity
with properties. ChangedPanelEntity.size
property fromFloat3dSize
toFloat2dSize
. Remmoved the deprecated methodandroidx.xr.scenecore.PanelEntity.getPixelDimensions
, usegetSizeInPixels
instead. (Icc174) - Replaced
androidx.xr.scenecore.OnSpaceUpdatedListener
withRunnable
. (I19308) - Replaced
SpatialUser.getCameraViews()
with a property. (Ib0cc5) ForExrImage
andGltfModel:
Changedcreate
methods to be suspend functions; modified create parameters to accept aUri
orPath
instead of aString
. (Id8883) (I0d247), (I25706) - Moved
SpatialEnvironment.requestFullSpaceMode
andSpatialEnvironment.requestHomeSpaceMode
to Scene, for example usesession.scene.requestFullSpaceMode()
instead ofsession.scene.spatialEnvironment.requestFullSpaceMode()
.addOnPassthroughOpacityChangedListener
andaddOnSpatialEnvironmentChangedListener
now have overrides that accept optional Executors. (I12fe0) (I6b21e) - Removed the following deprecated
SpatialEnvironment
methods:togglePassthrough
,setPassthrough
,setPassthroughOpacity
,getPassthroughMode
,getPassthroughOpacity
,setSkybox
, andsetGeometry
. Also removed deprecated classSpatialEnvironment.PassthroughMode
(I927bd) (I927bd) (I927bd) - Replaced the following
SpatialEnvironment
getters and setters with Kotlin properties:getCurrentPassthroughOpacity()
,get/setPassthroughOpacityPreference()
,get/setSpatialEnvironmentPreference()
,isSpatialEnvironmentPreferenceActive()
(I33a7b) (Ie06e2) (Ie06e2) SpatialEnvironmentPreference.preferredPassthroughOpacity
type changed fromFloat?
toFloat
. It no longer accepts null values. Instead,SpatialEnvironment.NO_PASSTHROUGH_OPACITY_PREFERENCE
is used to signal that there's no opacity preference. (I40107)- Updated the
windowBoundsPx
parameter topixelDimensions
and its type from Rect toIntSize2d
in the create method. (I1926e) SpatialEnvironment
constructor is now internal (I75a51)- Replaced class
SpatialPointerIconNone
andSpatialPointerIconCircle
classes with companion objectsSpatialPointerIcon.NONE
andSpatialPointerIcon.CIRCLE
(I416d2) SpatialPointerIcon
inSpatialPointerComponent
is no longer nullable. UseSpatialPointerIcon.DEFAULT
instead of null to indicate that the system default pointer icon should be used. (I416d2)- Replaced
androidx.xr.scenecore.AnchorEntity.getState()
with a read-only property. Renamed parameters on theAnchorEntity.create()
method for clarity. InAnchorEntity
's methods for setting and adding listeners, the listener has been moved to the final argument to enabled trailing lambdas. Replacedandroidx.xr.scenecore.OnStateChangedListener
forAnchorEntity
withConsumer<AnchorEntity.State>
. (I472e0) GltfModelEntity.getAnimationState()
is now a property. (I10b29)- Replaced
ActivitySpace.getBounds()
with a property. RenamedActivitySpace.addBoundsChangedListener
toActivitySpace.addOnBoundsChangedListener
. ReplacedActivitySpace.setOnSpaceUpdatedListener
with add/remove methods. (I4c956) - For
AnchorPlacement: planeTypeFilter
was renamed toanchorablePlaneOrientations
,planeSemanticFilter
was renamed toanchorablePlaneSemanticTypes
. Add aMovableComponent
to anAnchorEntity
orActivitySpace
will return false,MoveListener
was renamed toEntityMoveListener shouldDisposeParentAnchor
was renamed todisposeParentOnReAnchor systemMovable
was removed from thecreate
function in favor ofcreeateCustomMovable
,createSystemMovable
andcreateAnchorable
(If11c4) - Removed
SurfaceEntity.featherRadiusX/Y
and adds anEdgeFeatheringParams
class concept. (Ic78fc) PanelEntity.enablePanelDepthTest()
method replaced withpanelClippingConfig
property. SetScene.panelClippingConfig = PanelClippingConfig(isDepthTestEnabled = true)
to enable depth-testing or set it toPanelClippingConfig(isDepthTestEnabled = false)
to disable it. (I0cbe0)Scene.mainPanelEntity
is now of typeMainPanelEntity
instead ofPanelEntity
(I7125a)- Renamed Scene's
setFullSpaceMode
method toconfigureBundleForFullSpaceModeLaunch
andsetFullSpaceModeWithEnvironmentInherited
method toconfigureBundleForFullSpaceModeLaunchWithEnvironmentInherited
. (I0cbe0) (I0cbe0) - Renamed
SpatialVisibility
's UNKNOWN, OUTSIDE_FOV, PARTIALLY_WITHIN_FOV, and WITHIN_FOV values to SPATIAL_VISIBILITY_UNKNOWN, SPATIAL_VISIBILITY_OUTSIDE_FIELD_OF_VIEW, SPATIAL_VISIBILITY_PARTIALLY_WITHIN_FIELD_OF_VIEW, and SPATIAL_VISIBILITY_WITHIN_FIELD_OF_VIEW, respectively (Ie7e8c) SpatialVisibility
class replaced with public object with const Int values.setSpatialVisibilityChangedListener
now accepts aConsumer<Int>
instead ofConsumer<SpatialVisibility>
(Ie7e8c)PointerCaptureComponent
constants renamed and moved toPointerCaptureComponent.PointerCaptureState
object (I9c7ac)- Replaced
PointerCaptureComponents' StateListener
withConsumer<Int>
. (I9c7ac) - Replaced
InputEventListener
withConsumer<InputEvent>
(I9c7ac) setPreferredAspectRatio
moved from Scene class toSpatialWindow
object and takes in Session as first parameter. (I7b717)Entity.setHidden()
replaced byEntity.setEnabled()
andEntity.isHidden()
replaced byEntity.isEnabled()
.setHidden(false)
is equal tosetEnabled(true)
andisHidden() == !isEnabled()
. (Icf0de)Entity.contentDescription
type changed from String toCharSequence
. (Ie59be)Session.create
andSession.configure
now throwSecurityException
when sufficient permissions have not been granted instead of returningSessionCreatePermissionsNotGranted
orSessionConfigurePermissionsNotGranted
. (I7c488)ResizableComponent.create
now requires aConsumer<ResizeEvent> ResizeEventListener
was replaced withConsumer<ResizeEvent> ResizableComponent.size
was renamed toResizableComponent.affordanceSize ResizableComponent.minimumSize
was renamed toResizableComponent.minimumEntitySize ResizableComponent.maximumSize
was renamed toResizableComponent.maximumEntitySize
,ResizableComponent.autoHideContent
was renamed toResizableComponent.shouldAutoHideContent
ResizableComponent.forceShowResizeOverlay
was renamed toResizableComponent.shouldAlwaysShowOverlay
(I97a2d)- Reduced
minSDK
to 24 forandroidx.xr.scenecore
andandroidx.xr.compose
. XR packages still require API 34 at runtime. (I17224) - Removed
RequiresApi(34)
restriction on all Jetpack XR packages. This restriction was redundant as Jetpack XR is currently only available on devices with API level 34+. (Iae0f8) - The main
SceneCore
artifact (xr:scenecore:scenecore
) will only contain Kotlin-style async APIs. Java developers can depend on thexr:scenecore:scenecore-guava
library to access compatible APIs. (If221b) - Projects released with Kotlin 2.0 require KGP 2.0.0 or newer to be consumed (Idb6b5)
- This library now uses JSpecify nullness annotations, which are type-use. Kotlin developers should use the following compiler argument to enforce correct usage:
-Xjspecify-annotations=strict
(this is the default starting with version 2.1.0 of the Kotlin compiler) (Ia8420) - All async methods that return
ListenableFuture
have been replaced with Kotlin suspend functions. Java developers that wish to useListenableFuture
-based async methods instead Kotlin suspend functions must now use extension functions in:xr:scenecore-scenecore-guava
. For example,GuavaExrImage
contains the Guava-equivalent ExrImage async functions,GuavaScenePose
contains the Guava-equivalentScenePose
async functions,GuavaGltfModel
contains theGuava-equivalent GltfModel
async functions, etc. (If7283) (I0af60) (If7283) (Ia8515) (I4efdf) (I54bbf) (I3467a) (I82a33)
Bug Fixes
- Updated Jetpack XR Scenecore
ProGuard
rule to preventAbstractMethodError
for minified clients. (I91a01) - Additional fixes to support Proguard minification for Jetpack XR
SceneCore
(I4f47e) - Fixed a bug where an
InteractableComponent
may cause a crash if thehitPosition
on the HitInfo of theInputEvent
may crash if thehitPosition
returned from the system was null (I7a695) - Config *Mode vals have been renamed to reflect their behavior. (I6d247)
- Fixed issues with FOV and
HitTest
inSceneCore
TestApp. (I2c51e) - Fixed bug in
SpatialCapabilities.hasCapability()
where it would return true if any of the capabilities passed in with a bitwise OR was true instead of only returning true if they were all true. (I2cd40) SurfaceEntity.StereoMode.TOP_BOTTOM
updated to have the top map to the left eye and the bottom map to the right eye. (I4ae68)
Version 1.0.0-alpha04
May 7, 2025
androidx.xr.scenecore:scenecore:1.0.0-alpha04
and androidx.xr.scenecore:scenecore-testing:1.0.0-alpha04
are released. Version 1.0.0-alpha04 contains these commits.
New Features
- Backhandling will now work on panel entities without embedded activities. For backhandling to work you need to specify
android:enableOnBackInvokedCallback= "true"
in the android manifest. StereoSurfaceEntity
now supports MV-HEVC playback through two newStereoMode
values: MULTIVIEW_LEFT_PRIMARY and MULTIVIEW_RIGHT_PRIMARY.PanelEntity.setSize
andPanelEntity.getSize
now return sizes in parent space.Entity.setPose
,Entity.getPose
,Entity.setScale
,Entity.getScale
,Entity.setAlpha
andEntity.getAlpha
now take a new paramrelativeTo
, which allows get/set values relative to different spaces. The supported values are Parent, Activity and Real World spaces, and the default value for this param is Parent.- Spatial Visibility Callback extension methods added to
SessionExt.kt
to monitor when the scene content moves inside or outside the user's field of view. setPointSourceParams
has been added toSpatialAudioTrack
, allowing the params to be updated after the track has been built.- Added a new class, Scene, with references to
Scenecore
APIs. Scene will be accessible as an extension property of Session. Functions inside ofSessionExt
have been moved to Scene so imports will be need to be adjusted; for example,SessionExt.getScene(session)
.addSpatialCapababilitiesChangedListener
versusSessionExt.addSpatialCapabilitiesChangedListener
. ActivityPose.hitTestAsync
was added, enabling ahitTest
against virtual content.- Added new Component type
SpatialPointerComponent
, allowing clients to specify the icon rendered for the pointer, or to disable the icon. This Component can currently be attached toPanelEntity
instances only. - Introducing new
PanelEntity
factory, which takes panel dimensions in either meters or pixels. OlderPanelEntity
factory taking two Dimension type params for panel removed.
API Changes
- Removed
RequiresApi(34)
restriction on all Jetpack XR packages. This restriction was redundant as Jetpack XR is currently only available on devices with API level 34+. (Iae0f8) - Projects released with Kotlin 2.0 require KGP 2.0.0 or newer to be consumed (Idb6b5)
PermissionHelper
class has been removed.PanelEntity.getPixelDensity
is deprecated.PanelEntity.setPixelDimensions
andPanelEntity.getPixelDimension
are removed, replaced bysetSizeInPixels
andgetSizeInPixels
.Entity.getActivitySpaceAlpha
removed. Can be replaced withEntity.getAlpha(Space.Activity)
.Entity.getWorldSpaceScale
removed. Can be replaced withEntity.getScale(Space.REAL\_WORLD)
.- The Session class in
SceneCore
has been deleted in favor of the Session in XR Runtime. StereoSurfaceEntity
has been renamed toSurfaceEntity
.Entity.setSize
andEntity.getSize
are removed, and the same methods were added toPanelEntity
.PointSourceAttributes
has been renamed toPointSourceParams
.SpatializerConstants.SOURCE\_TYPE\_BYPASS
has been renamed toSpatializerConstants.SOURCE\_TYPE\_DEFAULT
.PointSourceParams
entity has been modified from public to internal access.AnchorEntity.create
now requiresPlaneTrackingMode
to be configured inSession.configure()
.SpatialUser
APIs now requireHeadTrackingMode
to be configured inSession.configure()
.- When
ResizableComponent
is not attached, it will give INFO-level log instead of ERROR-level log. - Fov class is now a regular Kotlin class.
- Split
Entity.kt
to place each concrete entity type into its own file. - When creating a new
PanelEntity
, most Views will be reparented to aFrameLayout
. This facilitates the use ofLayoutInspector
with Spatial Panels. - The currently used
XrExtensions
instance is now registered with the platform, in a best effort way, to help with app debugging.
Bug Fixes
- A fix was added to prevent a crash that could occur when a
PanelEntity
withMovableComponent
andAnchorPlacement
was moved - Fixed an issue where
ResizableComponent
was providing stale sizes inonResizeStart
callback. - Fixed crash when
JxrPlatformAdapterAxr
'sdispose()
was called multiple times.
Version 1.0.0-alpha03
February 26, 2025
androidx.xr.scenecore:scenecore:1.0.0-alpha03
and androidx.xr.scenecore:scenecore-testing:1.0.0-alpha03
are released. Version 1.0.0-alpha03 contains these commits.
New Features
- Proguard minification is now supported for Jetpack XR code
Bug Fixes
- Additional fixes to support Proguard minification for Jetpack XR SceneCore (I4f47e)
- Updated Jetpack XR Scenecore
ProGuard
rule to preventAbstractMethodError
for minified clients. (I91a01)
Version 1.0.0-alpha02
February 12, 2025
androidx.xr.scenecore:scenecore:1.0.0-alpha02
and androidx.xr.scenecore:scenecore-testing:1.0.0-alpha02
are released. Version 1.0.0-alpha02 contains these commits.
Upcoming breaking change affecting apps built before 1.0.0-alpha02
- Factory methods have been moved from the
Session
class to a companion method on each respective type:Session.createActivityPanelEntity(Dimensions, String, Activity, Pose)
has been deleted and replaced withActivityPanelEntity.create(Session, Dimensions, String, Pose)
Session.createAnchorEntity(Anchor)
has been deleted and replaced withAnchorEntity.create(Session, Anchor)
Session.createAnchorEntity(Dimensions, Int, Int, Duration)
has been deleted and replaced withAnchorEntity.create(Session, Dimensions, Int, Int, Duration)
Session.createEntity(String, Pose)
has been deleted and replaced withContentlessEntity.create(Session, String, Pose)
Session.createExrImageResource(String)
has been deleted and replaced withExrImage.create(Session, String)
Session.createGltfEntity(GltfModel, Pose)
has been deleted and replaced withGltfModelEntity.create(Session, GltfModel, Pose)
Session.createGltfModelResource(String)
has been deleted and replaced withGltfModel.create(Session, String)
Session.createInteractableComponent(Executor, InputEventListener)
has been deleted and replaced withInteractableComponent.create(Session, Executor, InputEventListener)
Session.createMovableComponent(Boolean, Boolean, Set<AnchorPlacement>, Boolean)
has been deleted and replaced withMovableComponent.create(Session, Boolean, Boolean, Set<AnchorPlacement>, Boolean)
Session.createPanelEntity(View, Dimensions, Dimensions, String, Pose)
has been deleted and replaced withPanelEntity.create(Session, View, Dimensions, Dimensions, String, Pose)
Session.createResizableComponent(Dimensions, Dimensions)
has been deleted and replaced withResizableComponent.create(Session, Dimensions, Dimensions)
Session.createStereoSurfaceEntity(Int, Dimensions, Pose)
has been deleted and replaced withStereoSurface.create(Session, Int, Dimensions, Pose)
- The following deprecated methods were removed:
Session.canEmbedActivityPanel(Activity)
has been deleted. UsegetSpatialCapabilities.hasCapabilility(SPATIAL_CAPABILITY_EMBED_ACTIVITY)
instead.Session.hasSpatialCapability(Int)
has been deleted. It has been replaced in favor of usinggetSpatialCapabilities().hasCapability()
as a more compartmentalized way to check for the presence of spatial capabilities sincegetSpatialCapabilities()
returns aSpatialCapabilities
object.Session.requestFullSpaceMode()
has been deleted and replaced withSpatialEnvironment.requestFullSpaceMode()
Session.requestHomeSpaceMode()
has been deleted and replaced withSpatialEnvironment.requestHomeSpaceMode()
Session.setFullSpaceMode(Bundle)
andSession.setFullSpaceModeWithEnvironmentInherited(Bundle)
have been moved to extension functions. Developer files will need to add the new imports for access:import androidx.xr.scenecore.setFullSpaceMode
import androidx.xr.scenecore.setFullSpaceModeWithEnvironmentInherited
Session.setPreferredAspectRatio(Activity, Float)
has been moved to an extension function. Developer files will need to add the new import for access:import androidx.xr.scenecore.setPreferredAspectRatio
Session.getEntitiesOfType(Class<out T>)
andSession.getEntityForRtEntity(RtEntity)
have been moved to extension functions. Developer files will need to add the new imports for access:import androidx.xr.scenecore.getEntitiesOfType
import androidx.xr.scenecore.getEntityForRtEntity
Session.unpersistAnchor(Anchor)
has been deletedSession.createPersistedAnchorEntity(UUID)
has been deleted
Known issues
PanelEntity.setCornerRadius()
andActivityPanelEntity.setCornerRadius()
may not take effect until the panel is next moved, this can be mitigated by moving the panel to its current position- When
BoundsChanged
is called on theActivitySpace
, someActivityPose
s may not have been correctly updated. It will be updated on the followingOnSpaceUpdated
call on theActivitySpace
Breaking & behavioral changes
PanelEntity
andActivityPanelEntity
will have a default corner radius of 32dp or smaller if the panel has a width or height smaller than 32dp
New APIs and capabilities
- Introduces
StereoSurface.CanvasShape
, which allows for the creation ofSpherical
andHemispherical
canvases for rendering immersive media. StereoSurfaceEntity.create()
now accepts aCanvasShape
parameter. (This parameter is currently ignored, but will be used in a future release)StereoSurfaceEntity.create()
no longer takes aDimensions
parameter. Applications should control the size of the canvas through setting theCanvasShape
StereoSurfaceEntity
has aCanvasShape
member which can be set dynamically.StereoSurfaceEntity.dimensions
is now a read-only property; applications should set theCanvasShape
to change dimensions.StereoSurfaceEntity
now allows theStereoMode
to be re-set after construction.
Other changes
- Reduced compile-time minSDK to 24. All Jetpack XR APIs continue to require API 34 at runtime.
SceneCore
's Session factory (Session.create
) no longer launches an intent to acquire theSCENE_UNDERSTANDING
permission. Instead, the client application must explicitly request the permissions from the user, before attempting to create the anchors. Anchor creation will fail if the permission is not granted by the user.
Bug fixes
getActivitySpacePose()
has been fixed to account for theActivitySpace
scale by returning translation values in scaled meters rather than always returning non-scaled meters.transformPoseTo
now also uses the right units to compute coordinate changes when theActivitySpace
is involved in the source or destination.- The skybox will now be set to an all-black skybox whenever a null skybox preference is passed using
setSpatialEnvironmentPreference(new SpatialEnvironmentPreference(null, geom))
. To revert to the system default skybox and geometry, usesetSpatialEnvironmentPreference(null).
Version 1.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.