July 30, 2025

New Features

  • Add getPrimaryHandSide so the developer could get the hand side info I270bd
  • Add geospatial check VPS availability API I58573
  • Add ARCore API for checkVpsAvailability Idbded
  • stateFlowable extension functions added to :xr:arcore:arcore-rxjava3 for usage by Java developers. I083aa b/427247794

API Changes

  • Config *Mode vals have been renamed to reflect their behavior. I6d247 b/414648065
  • The main ARCore artifact (xr:arcore:arcore) will only contain Kotlin-style async APIs. Java developers can depend on the xr:arcore:arcore-rxjava3 library to access compatible APIs. Ia525e b/422794329
  • The main ARCore artifact (xr:scenecore:scenecore) will only contain Kotlin-style async APIs. Java developers can depend on the xr:arcore:arcore-guava library to access compatible APIs. Iffcb4 b/422773524
  • Anchor.persistAsync() added to AnchorGuava for usage by Java developers. I4af1c b/425984631
  • Earth.createAnchorOnSurfaceAsync(Session, Double, Double, Double, Quaternion, Surface) added to EarthGuava for usage by Java developers. I66357 b/425992992
  • Java developers will use the extension functions for GltfModel.createAsync in GltfModel.kt. Async functions in GltfModel will be deleted. I0af60
  • 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 b/326456246
  • subscribeAsFlowable extension functions added to :xr:arcore:arcore-rxjava3 for usage by Java developers. Id3e49 b/427277298

Important changes since 1.3.0

Microbenchmark

  • Moved Gradle tasks lockClocks and unlockClocks to be on benchmark projects, instead of at the top level to respect Gradle project isolation.
  • Refactored BenchmarkRule to be built on top of coroutines, and support better yield() behavior. This should significantly reduce the risk of ANRs during benchmark runs, especially long CI runs. Note: UI Benchmarks should run with measureRepeatedOnMainThread

Macrobenchmark

  • Added workaround on API 34+ for CompilationMode.None() would have inconsistent performance due to ART's verify now partly compiling apps after first launch.
  • Experimental feature - Startup Insights can highlight certain common issues in a startup Macrobenchmark by passing MacrobenchmarkRule(..., experimentalConfig = ExperimentalConfig(StartupInsightsConfig(isEnabled = true))).
  • Added ArtMetric which can be used to detect JIT Compilation, and unoptimized class loading - both useful for validating Baseline Profile optimizations.

Baseline Profiles

  • BaselineProfileRule now collects profiles for multi-process apps.

Other Changes

  • TraceProcessor has been pulled out into its own library (androidx.benchmark:benchmark-traceprocessor) so that it can be used outside of Macrobenchmark metrics, in other cases. It can also be run on Desktop JVM by defining your own ServerLifecycleManager.

Bug Fixes

  • TextFieldState.edit { } no longer clears the undo history. Instead it creates a standalone undo entry. If the desired behavior is to clear the undo stack after an edit call, please use TextFieldState.undoState.clearHistory(). I12c14

Breaking changes

  • All public APIs tagged with ExperimentalMaterial3ExpressiveApi or ExperimentalMaterial3ComponentOverrideApi have been removed, please switch to 1.5.0-alpha to continue enjoying these features. Ie4ae0
  • Please expect the following stabilized pullToRefresh APIs to be renamed in the next release. Ib6cbe

New Features

  • Tooltip now supports custom caret shape and custom caret position (above, below, left, or right of the anchor). Ie513c

API Changes

  • Suspend annotation has been removed from onDismiss callback. Ie3166
  • DatePickerState.getDisplayedMonth(): YearMonth? and DateRangePickerState.getDisplayedMonth(): YearMonth? were updated to return non nullable value. Ice09c b/427952972
  • Remove ModalWideNavigationRailDefaults, move its contents to WideNavigationRailDefaults and rename its shape related names. Ic5e61

Bug Fixes

  • Ensures DatePicker respects its own locale for number formatting. Previously, if DatePicker was configured for an Arabic locale, it could incorrectly render Latin digits if the device's system locale used a different numbering system. Iccf76 b/432616196
  • Fix a LinearProgressIndicator issue that did not render a stop indicator correctly in RTL layouts. I0734c
  • PrimaryScrollableTabRow and SecondaryScrollableTabRow divider now extends to the full screen size, even when tab content does not extend to the end of the screen. Ic1e9c b/261741384

New Features

  • Add more position provider for tooltips so now developers can control if tooltip is placed above, below, left, or right of the anchor. Add an API that takes in a Shape for carets, so more custom shapes can be provided. Ie513c

API Changes

  • TextFieldColors methods to calculate component colors based on state are now public. I03165
  • Suspend annotation has been removed from onDismiss callback. Ie3166
  • DatePickerState.getDisplayedMonth(): YearMonth? and DateRangePickerState.getDisplayedMonth(): YearMonth? were updated to return non nullable value. Ice09c b/427952972
  • Remove ModalWideNavigationRailDefaults, move its contents to WideNavigationRailDefaults and rename its shape related names. Ic5e61
  • WideNavigationRailItem’s colors and copy deprecated functions should be level Hidden. Id7e82
  • Change level of deprecated WideNavigationRail apis to Warning and make them experimental. I89085

Bug Fixes

  • Ensures DatePicker respects its own locale for number formatting. Previously, if DatePicker was configured for an Arabic locale, it could incorrectly render Latin digits if the device's system locale used a different numbering system. Iccf76 b/432616196
  • Fix a LinearProgressIndicator issue that did not render a stop indicator correctly in RTL layouts. I0734c
  • PrimaryScrollableTabRow and SecondaryScrollableTabRow divider now extends to the full screen size, even when tab content does not extend to the end of the screen. Ic1e9c b/261741384

API Changes

  • Support preferred width/height represented in proportions. I63dda
  • Hides Reflow and Levitate strategies' constructor parameters; also renames targetPane to reflowUnder. Ifa81b

Bug Fixes

  • Fix performance regression caused by snapshoting the scaffold state transition progress I3d555 b/417329258

Bug Fixes

  • Fixes an issue where icons loaded via painterResource with theme-specific colors didn't update on system theme changes. I85ea0 b/424416571
  • Fixes errors on APIs 21(Lollipop) and 28(Pie) where important graphics methods were renamed while being optimized. Iebf99 b/425120571 b/420462749
  • Ensure that newly inserted onLayoutRectChanged modifiers get called back initially. l9aa91, lb348a
  • Fix for an offset cache being incorrectly invalidated, causing onLayoutRectChanged modifiers to be called with wrong coordinates ibd4cd, lddc57
  • Fix for rotated/skewed layouts receiving incorrect coordinates by onLayoutRectChanged modifiers lddc57 b/426750475

External Contribution

  • Fixed an issue where dragAndDropSource items in LazyList disappear when scrolled. Thanks Victor Rendina! dc3bcd3 b/425894792

Changes since last stable release 1.6.0 include:

Bug Fixes

  • Fix Rect handling in ViewCapture for SDK >= 34 for non root views.
  • Fix bug reporting the status code when PixelCopy fails in ViewCapture.generateBitmapFromPixelCopy.
  • Improving wording of a failure message.

API Changes

  • Update to minSdkVersion 21

Dependency Updates

  • Update bazel toolchain:
    • bazel version 7.5.0
    • rules_jvm_external 6.7
    • rules_java 8.6.3
    • rules_kotlin 2.1.3
    • rules_android 0.6.3
  • Update dependencies to:
    • androidx.annotation 1.7.0
    • androidx.concurrent futures 1.2.0
    • kotlin 1.9.0
    • kotlin coroutines 1.10.1

The following artifacts were released:

  • androidx.test.espresso:espresso-accessibility:3.7.0
  • androidx.test.espresso:espresso-core:3.7.0
  • androidx.test.espresso:espresso-contrib:3.7.0
  • androidx.test.espresso:espresso-idling-resource:3.7.0
  • androidx.test.espresso:espresso-intents:3.7.0
  • androidx.test.espresso:espresso-remote:3.7.0
  • androidx.test.espresso:espresso-web:3.7.0
  • androidx.test.espresso.idling:idling-concurrent:3.7.0
  • androidx.test.espresso.idling:idling-net:3.7.0

Changes since last stable 3.6.1 release include:

Bug Fixes

  • Fix deadlock in espresso in Robolectric INSTRUMENTATION_TEST + paused looper.
  • Refactor espresso's MessageQueue access into a TestLooperManagerCompat class, and use new TestLooperManager APIs when available.
  • Update bazel toolchain:
    • bazel version 7.5.0
    • rules_jvm_external 6.7
    • rules_java 8.6.3
    • rules_kotlin 2.1.3
    • rules_android 0.6.3
  • Update dependencies to:
    • androidx.annotation 1.7.0
    • androidx.concurrent-futures 1.2.0
    • kotlin 1.9.0
  • Only hold main Looper's TestLooperManager during interrogation
  • Fix #2349, where multi-process + different rotation on 2 activities would instantly timeout when waiting for the UI to rotate.
  • Use getSystemService instead of reflective InputManager.getInstance

API Changes

  • Update to minSdkVersion 21

Changes since last stable 1.0.1 release include:

Bug Fixes

  • Fix DisplaySizeRule not consistently restoring to original emulator state for failing tests
  • Support using DisplaySizeRule without an activity in the resumed state
  • Update bazel toolchain:
    • bazel version 7.5.0
    • rules_jvm_external 6.7
    • rules_java 8.6.3
    • rules_kotlin 2.1.3
    • rules_android 0.6.3
  • Update dependencies to:
    • androidx.annotation 1.7.0
    • gRPC 1.71.0
    • kotlin 1.9.0
    • kotlin coroutines 1.10.1
  • Add support for setting screen orientation with multiple resumed activities
  • Fix concurrent modification issue when setting screen orientation and fold modes
  • Adjust reference docs to state set up guide is now located at https://developer.android.com/studio/test/espresso-api#set_up_your_project_for_the_espresso_device_api

API Changes

  • Update WidthSizeClass and HeightSizeClass to use androidx.window size classes
  • Update to minSdkVersion 21

New Features

  • Made SubspaceComposable annotation class public. Ic2a34 b/399432430
  • Two new SpatialExternalSurface Composables representing 180 and 360 degree spheres. I40ef2 b/391705799
  • Added SubspaceModifier.aspectRatio Ide5ab b/399729509 b/414762147
  • Added the SceneCoreEntity API to improve interoperability between SceneCore and Compose for XR. I50bb3 b/423020989
  • Provided GravityAlignedsubspace API to support the unscaled And GravityAligned feature I07359

API Changes

  • SpatialDialog() will follow SpatialDialogProperties.dismissOnBack press configuration. Ib453b b/416797132
  • Update minimumPanelDimension to a new default Dimension size of Dimensions(0.1f, 0.1f, 0.1f) due its representation in Meters. Ib852a
  • Subspaces and Orbiters will now retain their internal state in home space and when the app is in the background. In home space mode, Subspace will still set up its scene in preparation for the switch to full space mode. I40317 b/416037751
  • SpatialDialogs will now retain their state when the app is in the background. I6aa56
  • ApplicationSubspace will now inherit its recommended scale and position from the system. I4565f b/418834194
  • Added a better error message and trigger the error earlier when a SubspaceComposable is used in a non-SubspaceComposable context. Iee2ae b/416484684
  • Updating ExperimentalSubspaceVolumeApi from Warning to Error because warnings are often overlooked when misusing composable APIs. I427aa b/424864286
  • Subspace and ApplicationSubspace are now constrained by recommendedContentBoxInFullSpace. Previously it was constrained by SpatialUser's Field of View. I41015 b/423074142
  • Update SpatialElevation to use min size to no longer use hard coded size I2dbe6 b/427785338
  • Update how we scrim the SpatialAcitivityPanel to update when a key variable is modified. I0f64d b/427999029
  • Remove VolumeConstraints.Unbounded in favor of setting the default constraint values to the equivalent. Ie24ec b/407938414
  • SpatialFeatheringSize is no longer public I1c15b b/399432430
  • Renamed the XR Placeable to SubspacePlaceable to distinguish it from Compose's Placeable. I74874
  • Removing Orbiter settings and adding shouldRenderInNonSpatial as a new param. In addition, removing class EdgeOffset and adding orbiterOffsetType as a new param to consolidate Orbiter() Functions. As well as renaming OrbiterEdge to ContentEdge. Iebf3d
  • Renamed Measurable to SubspaceMeasurable to differentiate the type from Compose's Measurable type. I9726c
  • Rename MeasureResult to SubspaceMeasureResult I9f34d
  • Removed the setSubspaceContent API in favor of using Compose's setContent with a Subspace composable. Ifff4c b/421427391 b/421427391
  • MeasurePolicy is renamed to SubspaceMeasurePolicy. I37a9b b/422553904
  • Turn SubspaceSemanticsInfo into a sealed interface because we won't be able to add members without the defaults. I372f9 b/423704068
  • Updated SpatialExternalSurface documentation, renamed ContentSecurityLevel to SurfaceProtection I3c460 b/420982808
  • Provided overloaded constructor for movable modifier which allows anchoring. Ic0c70
  • Add more position provider for tooltips so now developers can control if the tooltip is placed above, below, left, or right of the anchor. Add an API that takes in a Shape for carets, so more custom shapes can be provided. Ie513c b/374766087 b/418854637
  • Removed CoreEntity as a PublishedApi Ifee05

Bug Fixes

  • Fixed issue where SpatialDialog would flash when being rendered. Ife73c b/401619909
  • Fixes issue where SpatialDialog could not scrim the Activity Panel. I8ca6c b/367442109
  • Fix XR dialog not showing some content I17cd5 b/418062437
  • Fixed issue where SpatialPopup was being dismissed when clicked inside of the content. If262c b/417245722
  • Fixed the issue where when chaining resizable().movable() the SpatialPanel failed to resize correctly to the new size. I02ee3 b/422264230
  • Fixed topBar overlapping with menu in SpatialComposeVideoPlayer Id33bc b/427168167
  • Fixed corner radius not rendering I975fe b/428261830

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 to ActivitySpace. 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 to androidx.xr.runtime.math.IntSize2d; androidx.xr.scenecore.Dimensions to androidx.xr.runtime.math.FloatSize3d; androidx.xr.scenecore.ActivityPose to ScenePose, androidx.xr.scenecore.ContentlessEntity to GroupEntity, androidx.xr.scenecore.PlaneType to PlaneOrientation; androidx.xr.scenecore.PlaneSemantic to PlaneSemanticType. Ifd405I3b622 If534d
  • A number of setters for Scene's properties have been made private; they were not intended to be mutated by SceneCore clients: activitySpace, activitySpaceRoot, mainPanelEntity, perceptionSpace, spatialCapabilities, spatialEnvironment, and spatialUser. I2f506
  • In Entity: Changed the following to properties: get/setParent(), setContentDescription; Deprecated Entity.is/setHidden(), use Entity.is/setEnabled instead. Ibc4c6
  • Removed the androidx.xr.scenecore.BasePanelEntity class, use PanelEntity directly instead. Replaced getters and setters for PanelEntity with properties. Changed PanelEntity.size property from Float3dSize to Float2dSize. Remmoved the deprecated method androidx.xr.scenecore.PanelEntity.getPixelDimensions, use getSizeInPixels instead. Icc174
  • Replaced androidx.xr.scenecore.OnSpaceUpdatedListener with Runnable. I19308
  • Replaced SpatialUser.getCameraViews() with a property. Ib0cc5 For ExrImage and GltfModel: Changed create methods to be suspend functions; modified create parameters to accept a Uri or Path instead of a String. Id8883 I0d247, I25706
  • Moved SpatialEnvironment.requestFullSpaceMode and SpatialEnvironment.requestHomeSpaceMode to Scene, for example use session.scene.requestFullSpaceMode() instead of session.scene.spatialEnvironment.requestFullSpaceMode(). addOnPassthroughOpacityChangedListener and addOnSpatialEnvironmentChangedListener now have overrides that accept optional Executors. I12fe0 I6b21e
  • Removed the following deprecated SpatialEnvironment methods: togglePassthrough, setPassthrough, setPassthroughOpacity, getPassthroughMode, getPassthroughOpacity, setSkybox, and setGeometry. Also removed deprecated class SpatialEnvironment.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 from Float? to Float. 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 to pixelDimensions and its type from Rect to IntSize2d in the create method. I1926e
  • SpatialEnvironment constructor is now internal I75a51
  • Replaced class SpatialPointerIconNone and SpatialPointerIconCircle classes with companion objects SpatialPointerIcon.NONE and SpatialPointerIcon.CIRCLE I416d2
  • SpatialPointerIcon in SpatialPointerComponent is no longer nullable. Use SpatialPointerIcon.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 the AnchorEntity.create() method for clarity. In AnchorEntity's methods for setting and adding listeners, the listener has been moved to the final argument to enabled trailing lambdas. Replaced androidx.xr.scenecore.OnStateChangedListener for AnchorEntity with Consumer<AnchorEntity.State>. I472e0
  • GltfModelEntity.getAnimationState() is now a property. I10b29
  • Replaced ActivitySpace.getBounds() with a property. Renamed ActivitySpace.addBoundsChangedListener to ActivitySpace.addOnBoundsChangedListener. Replaced ActivitySpace.setOnSpaceUpdatedListener with add/remove methods. I4c956
  • For AnchorPlacement: planeTypeFilter was renamed to anchorablePlaneOrientations, planeSemanticFilter was renamed to anchorablePlaneSemanticTypes. Add a MovableComponent to an AnchorEntity or ActivitySpace will return false, MoveListener was renamed to EntityMoveListener shouldDisposeParentAnchor was renamed to disposeParentOnReAnchor systemMovable was removed from the create function in favor of creeateCustomMovable, createSystemMovable and createAnchorable If11c4
  • Removed SurfaceEntity.featherRadiusX/Y and adds an EdgeFeatheringParams class concept. Ic78fc
  • PanelEntity.enablePanelDepthTest() method replaced with panelClippingConfig property. Set Scene.panelClippingConfig = PanelClippingConfig(isDepthTestEnabled = true) to enable depth-testing or set it to PanelClippingConfig(isDepthTestEnabled = false) to disable it. I0cbe0
  • Scene.mainPanelEntity is now of type MainPanelEntity instead of PanelEntity I7125a
  • Renamed Scene's setFullSpaceMode method to configureBundleForFullSpaceModeLaunch and setFullSpaceModeWithEnvironmentInherited method to configureBundleForFullSpaceModeLaunchWithEnvironmentInherited. 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 a Consumer<Int> instead of Consumer<SpatialVisibility> Ie7e8c
  • PointerCaptureComponent constants renamed and moved to PointerCaptureComponent.PointerCaptureState object I9c7ac
  • Replaced PointerCaptureComponents' StateListener with Consumer<Int>. I9c7ac
  • Replaced InputEventListener with Consumer<InputEvent> I9c7ac
  • setPreferredAspectRatio moved from Scene class to SpatialWindow object and takes in Session as first parameter. I7b717
  • Entity.setHidden() replaced by Entity.setEnabled() and Entity.isHidden() replaced by Entity.isEnabled(). setHidden(false) is equal to setEnabled(true) and isHidden() == !isEnabled(). Icf0de
  • Entity.contentDescription type changed from String to CharSequence. Ie59be
  • Session.create and Session.configure now throw SecurityException when sufficient permissions have not been granted instead of returning SessionCreatePermissionsNotGranted or SessionConfigurePermissionsNotGranted. I7c488
  • ResizableComponent.create now requires a Consumer<ResizeEvent> ResizeEventListener was replaced with Consumer<ResizeEvent> ResizableComponent.size was renamed to ResizableComponent.affordanceSize ResizableComponent.minimumSize was renamed to ResizableComponent.minimumEntitySize ResizableComponent.maximumSize was renamed to ResizableComponent.maximumEntitySize, ResizableComponent.autoHideContent was renamed to ResizableComponent.shouldAutoHideContent ResizableComponent.forceShowResizeOverlay was renamed to ResizableComponent.shouldAlwaysShowOverlay I97a2d
  • Reduced minSDK to 24 for androidx.xr.scenecore and androidx.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 the xr: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 use ListenableFuture-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-equivalent ScenePose async functions, GuavaGltfModel contains the Guava-equivalent GltfModel async functions, etc. If7283 I0af60 If7283 Ia8515 I4efdf I54bbf I3467a I82a33

Bug Fixes

  • Updated Jetpack XR Scenecore ProGuard rule to prevent AbstractMethodError 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 the hitPosition on the HitInfo of the InputEvent may crash if the hitPosition returned from the system was null I7a695
  • Config *Mode vals have been renamed to reflect their behavior. I6d247
  • Fixed issues with FOV and HitTest in SceneCore 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

Changes since last stable release 1.2.1 include:

Bug Fixes

  • Fixed the link to the deprecated androidx.test.rule.ActivityTestRule in the class description.
  • Update bazel toolchain:
    • bazel version 7.5.0
    • rules_jvm_external 6.7
    • rules_java 8.6.3
    • rules_kotlin 2.1.3
    • rules_android 0.6.3
  • Update dependencies to:
    • androidx.annotation 1.7.0
    • kotlin 1.9.0

API Changes

  • Update to minSdkVersion 21

New Features

  • Add a LifecycleOwner composable to enable creating scoped lifecycles directly within the UI. This is useful for components that need to manage their own lifecycles independently. For an example of how Navigation3 integrates this new composable, see aosp/3708610. 76cbf7

    @Composable
    fun MyComposable() {
        LifecycleOwner(
            maxLifecycle = RESUMED,
            parentLifecycleOwner = LocalLifecycleOwner.current,
        ) {
            val childLifecycleOwner = LocalLifecycleOwner.current
        }
    }
    

API Changes

  • Add a builder factory function for CreationExtras, providing a more convenient and idiomatic Kotlin API. Iab2bd
  • Add native support for nullable types in SavedStateHandle.saved, simplifying saving and restoring nullable properties. I54d69 b/421325690
  • Mark SavedStateHandle constructors as @VisibleForTesting. Iff0e0 b/408002794
  • Common Library:
    • Add support for replacing the player in ForwardingSimpleBasePlayer.
  • ExoPlayer:
    • Add getter for shuffle mode to the ExoPlayer interface #2522.
    • More clearly throw an exception if DefaultAudioSink is accessed from multiple threads. If this happens due to a call to RendererCapabilities.getFormatSupport outside of the player, make sure to call this method on the same thread as ExoPlayer's playback thread or use a different instance than the one used for playback #1191.
    • Fix bug where non-stereo audio formats on TVs may be marked as unsupported by DefaultTrackSelector.
    • Ensure the last frame is correctly rendered when using MediaCodec's DECODE_ONLY flag (which is enabled by default in scrubbing mode).
    • Add support for using the virtual device ID from the Context passed to ExoPlayer.Builder.
    • Enable dynamic scheduling by default in scrubbing mode.
    • Avoid unnecessary reload of a source when seeking to the end of an item.
    • Use MediaCodec.BUFFER_FLAG_DECODE_ONLY by default in scrubbing mode.
    • Throw IllegalStateException when PreloadMediaSource is played by an ExoPlayer with a playback thread that is different than the preload thread #2495.
    • Add cloneAndMove to ShuffleMode with a default implementation #2226.
    • Change default behavior of Renderer.getMinDurationToProgressUs to return a larger value if no call to render is required.
    • Fix bug where internal scheduling delayed last frame when seeking to the end while paused. For now, the bug fix only takes effect if ExoPlayer.Builder.experimentalSetDynamicSchedulingEnabled is enabled.
    • Add ExoPlayer.setScrubbingModeEnabled(boolean) method. This optimizes the player for many frequent seeks (for example, from a user dragging a scrubber bar around). The behavior of scrubbing mode can be customized with setScrubbingModeParameters(..) on ExoPlayer and ExoPlayer.Builder.
    • Allow customizing fractional seek tolerance in scrubbing mode.
    • Increase codec operating rate in scrubbing mode.
    • Fix bug where prepare errors in the content of AdsMediaSource may be never reported #2337.
    • Fix memory leak in MergingMediaSource, for example used when sideloading subtitles #2338.
    • Allow CmcdConfiguration.Factory to return null to disable CMCD logging for specific media items #2386.
    • Increase default image buffer size from 128kB (copy-paste mistake from text tracks) to 26MB, which is large enough for 50MP Ultra HDR images #2417.
    • Add PreCacheHelper that allows apps to pre-cache a single media with specified start position and duration.
    • Add support of preloading from specified position in DefaultPreloadManager.
  • Transformer:
    • Add CodecDbLite that enables chipset specific optimizations of video encoding settings.
    • Add setEnableCodecDbLite flag to the DefaultEncoderFactory to enable CodecDB Lite settings optimization. By default, this flag is set to false.
    • Filling an initial gap (added via addGap()) with silent audio now requires explicitly setting experimentalSetForceAudioTrack(true) in EditedMediaItemSequence.Builder. If the gap is in the middle of the sequence, then this flag is not required.
    • Move Muxer interface from media3-transformer to media3-muxer.
    • Make setting MediaItem.Builder().setImageDuration(long) mandatory to import a media item as an image.
    • Add Transformer.Builder().experimentalSetMp4EditListTrimEnabled(boolean) which includes an MP4 edit list when trimming to instruct players to ignore samples between the key frame before the trim start point, and the trim start point.
    • Update Composition Demo app to use Kotlin and Jetpack Compose, and add a custom VideoCompositorSettings to arrange sequences into a 2x2 or PiP layout.
  • Extractors:
    • Parse metadata from fragmented MP4 files #2084.
    • JPEG: Support motion photos that don't have an Exif segment at the start #2552.
    • Add support for seeking in fragmented MP4 with multiple sidx atoms. This behavior can be enabled using the FLAG_MERGE_FRAGMENTED_SIDX flag on FragmentedMp4Extractor #9373.
    • Ignore empty seek tables in FLAC files (including those containing only placeholder seek points), and fall back to binary search seeking if the duration of the file is known #2327.
    • Fix parsing of H.265 SEI units to fully skip unrecognized SEI types #2456.
    • Update WavExtractor to use the header extension's SubFormat data for the audio format when parsing a WAVE_FORMAT_EXTENSIBLE type file.
    • MP4: Add support for ipcm and fpcm boxes defining raw PCM audio tracks (64-bit floating point PCM is not supported).
    • MP4: Handle the rotation part of tkhd transformation matrices that both rotate and reflect the video. This ensures that reflected videos taken by the iPhone front facing camera display the right way up, but incorrectly reflected in the y-axis #2012.
    • MP3: Use duration and data size from unseekable Xing, VBRI and similar variable bitrate metadata when falling back to constant bitrate seeking due to FLAG_ENABLE_CONSTANT_BITRATE_SEEKING(_ALWAYS) #2194.
  • Audio:
    • Fix bug where AnalyticsListener.onAudioPositionAdvancing is not called when the audio playback is started very close to the end of the media.
    • Add support for all linear PCM sample formats in ChannelMappingAudioProcessor and TrimmingAudioProcessor.
    • Add support for audio gaps in CompositionPlayer.
    • Remove spurious call to BaseAudioProcessor#flush() from BaseAudioProcessor#reset().
    • Allow constant power upmixing/downmixing in DefaultAudioMixer.
    • Make ChannelMappingAudioProcessor, TrimmingAudioProcessor and ToFloatPcmAudioProcessor public #2339.
    • Use AudioTrack#getUnderrunCount() in AudioTrackPositionTracker to detect underruns in DefaultAudioSink instead of best-effort estimation.
    • Improve audio timestamp smoothing for unexpected position drift from the audio output device.
    • Fix bug where A/V sync is broken for the first 10 seconds after resuming from pause when connected to Bluetooth devices.
    • Fix bug that AnalyticsListener.onAudioPositionAdvancing was not reporting the time when the audio started advancing but the time of the first measurement.
    • Fix recovery to multichannel audio after fallback to stereo audio on some devices #2258.
  • Video:
    • Extend detached surface workaround to "lenovo" and "motorola" devices #2059.
    • Improve smooth video frame release at startup when audio samples don't start at exactly the requested position.
    • Extend detached surface workaround to "realme" devices #2059.
    • Add experimental ExoPlayer API to include the MediaCodec.BUFFER_FLAG_DECODE_ONLY flag when queuing decode-only input buffers. This flag will signal the decoder to skip the decode-only buffers thereby resulting in faster seeking. Enable it with DefaultRenderersFactory.experimentalSetEnableMediaCodecBufferDecodeOnlyFlag. * Improve codec performance checks for software video codecs. This may lead to some additional tracks being marked as EXCEEDS_CAPABILITIES.
    • Fix VP9 Widevine playback errors on some devices #2408.
  • Text:
    • Add support for VobSub tracks in MP4 files #2510.
    • Fix a playback stall when a subtitle segment initially fails to load and later loads successfully, followed by several empty subtitle segments #2517.
    • Fix SSA and SubRip to display an in-progress cue when enabling subtitles #2309.
    • Fix playback getting stuck when switching from a stream with a subtitle error to a live stream with an empty subtitle track #2328.
    • Fix garbled CEA-608 subtitles when playing H.262 streams containing B-frames #2372.
    • Add support for SSA subtitles with CodecId = S_TEXT/SSA in Matroska files. Previously MatroskaExtractor only supported CodecId = S_TEXT/ASS which is meant to represent the 'advanced' (v4+) variant of SubStation Alpha subtitles (but ExoPlayer's parsing logic is the same for both variants) #2384.
    • Add support for the layer property in SubStation Alpha (SSA) subtitle files which is used to define the z-order of cues when more than one is shown on screen at the same time #2124.
  • Metadata:
    • Added support for retrieving media duration and Timeline to MetadataRetriever and migrated it to an instance-based, AutoCloseable API. Use the new Builder to create an instance for a MediaItem, then call retrieveTrackGroups(), retrieveTimeline(), and retrieveDurationUs() to get ListenableFutures for the metadata. The previous static methods are now deprecated #2462.
  • Image:
    • Limit decoded bitmaps to the display size in BitmapFactoryImageDecoder, to avoid an app crashing with Canvas: trying to draw too large bitmap. from PlayerView when trying to display very large (e.g. 50MP) images.
    • Change the signature of DefaultRenderersFactory.getImageDecoderFactory() to take a Context parameter.
    • Align the max bitmap output size used in CompositionPlayer with that already used in Transformer (meaning CompositionPlayer does not consider the display size when decoding bitmaps, unlike ExoPlayer).
  • DRM:
    • Add new overload of OfflineLicenseHelper.newWidevineInstance accepting a MediaItem.DrmConfiguration so that HTTP request headers can be applied correctly #2169.
  • Effect:
    • Add Presentation.createForShortSide(int) that creates a Presentation that ensures the shortest side always matches the given value, regardless of input orientation.
  • Muxers:
    • Fix a bug where correct sample flags were not set for audio samples in fragmented MP4.
    • writeSampleData() API now uses muxer specific BufferInfo class instead of MediaCodec.BufferInfo.
    • Add Muxer.Factory#supportsWritingNegativeTimestampsInEditList which defaults to false.
  • IMA extension:
    • Fix a bug where a load error in one ad may accidentally invalidate another ad group.
    • Fix bug where ad groups after the end of a VOD window stalled playback. Ads groups with a start time after the window are not enqueued into the MediaPeriodQueue anymore #2215.
  • Session:
    • Fix bug where connections from third-party non-privileged Media3 controllers are ignored.
    • Remove check for available commands when sending custom commands to a legacy MediaBrowserServiceCompat. This is in parity with the behavior of legacy controllers/browsers when connected to a legacy app.
    • Fix a bug that causes a player's first playback error to be incorrectly treated as a persistent custom exception. This prevents the application from recovering.
    • Fix bug where some controller changes that are not handled by the session may cause IllegalStateExceptions.
    • Fix bug where controller actions that are not handled by the session may leave the controller in an invalid state.
    • Fix StrictMode unsafe launch violation warning #2330.
    • Fix bug where calling setSessionExtras from the main thread when running the player from a different application thread then the main thread caused an IllegalStateException #2265.
    • Don't automatically show a notification if a player is set up with media items without preparing or playing them (#2423https://github.com/androidx/media/issues/2423). This behavior is configurable via MediaSessionService.setShowNotificationForIdlePlayer.
    • Add custom PlaybackException for all or selected controllers.
    • Fix bug where seeking in a live stream on a MediaController can cause an IllegalArgumentException.
    • For live streams, stop publishing a playback position and the ability to seek in the current item for platform media controllers, to avoid position artefacts in the Android Auto UI (and other controllers using this information from the platform media session) #1758.
    • Fix a bug where passing null into getLibraryRoot of a MediaBrowser connected to a legacy MediaBrowserServiceCompat produced a NullPointerException.
    • Fix a bug where sending custom actions, a search result or a getItem request crashed the legacy session app with a ClassNotFoundException.
    • Fix a bug where MediaItem.LocalConfiguration.uri was shared to the platform sessions's MediaMetadata. To intentionally share a URI to allow controllers to re-request the media, set MediaItem.RequestMetadata.mediaUri instead.
  • UI:
    • Fix bug where PlayerSurface inside re-usable components like LazyColumn didn't work correctly #2493.
    • Fix a Compose bug which resulted in a gap between setting the initial button states and observing the change in state (e.g. icon shapes or being enabled). Any changes made to the Player outside of the observation period are now picked up #2313.
    • Add state holders and composables to the media3-ui-compose module for SeekBackButtonState and SeekForwardButtonState.
    • Add support for ExoPlayer's scrubbing mode to PlayerControlView. When enabled, this puts the player into scrubbing mode when the user starts dragging the scrubber bar, issues a player.seekTo call for every movement, and then exits scrubbing mode when the touch is lifted from the screen. This integration can be enabled with either time_bar_scrubbing_enabled = true in XML or the setTimeBarScrubbingEnabled(boolean) method from Java/Kotlin.
    • Make PlayerSurface accept a nullable Player argument.
  • Downloads:
    • Add partial download support for progressive streams. Apps can prepare a progressive stream with DownloadHelper, and request a DownloadRequest from the helper with specifying the time-based media start and end positions that the download should cover. The returned DownloadRequest carries the resolved byte range, with which a ProgressiveDownloader can be created and download the content correspondingly.
    • Add DownloadHelper.Factory with which the static DownloadHelper.forMediaItem() methods are replaced.
    • Add Factory for SegmentDownloader implementations.
    • Add partial download support for adaptive streams. Apps can prepare an adaptive stream with DownloadHelper, and request a DownloadRequest from the helper with specifying the time-based media start and end positions that the download should cover. The returned DownloadRequest carries the resolved time range, with which a concrete SegmentDownloader can be created and download the content correspondingly.
  • Cronet extension:
    • Add automatic cookie handling #5975.
  • HLS extension:
    • Fix bug where HlsSampleStreamWrapper attempts to seek inside buffer when there are no chunks available in the buffer #2598.
    • Fix bug where track selection changes after loading low-latency parts and preload hints can cause playback to get stuck or freeze #2299.
    • Prevent excessive reloads by waiting for half the target duration when CAN-BLOCK-RELOAD=YES is not honored by the server #2317.
    • Fix bug where playback was stalled when starting an interstitials stream before a mid roll and asset list resolution was attempted for the wrong ad #2558.
    • Fix playlist parsing to accept \f (form feed) in quoted string attribute values #2420.
    • Support updating interstitials with the same ID #2427.
    • Fix bug where playlist load errors are sometimes not propagated once a live stream runs out of segments to load (#2401https://github.com/androidx/media/issues/2401).
    • Group subtitle renditions by NAME tag, similar to how audio renditions are grouped already #1666.
    • Support X-ASSET-LIST and live streams with HlsInterstitialsAdsLoader.
  • DASH extension:
    • Fix issue where trick-play adaptation set is merged with its main adaptation set to form an invalid TrackGroup #2148.
    • Fix bug where shortening a DASH period duration can throw an exception when samples beyond the new duration have already been read by the rendering pipeline #2440.
    • Fix bug where redirect wasn't followed when using CMCD query parameters #2475.
  • RTSP extension:
    • Add support for RTP Aggregation Packet for H265 in accordance with RFC 7798#4.4.2 #2413.
    • Fix RtspClient to use the location uri as provided when processing an HTTP 302 response #2398.
    • Add parsing support for SessionDescriptions containing lines with trailing whitespace characters #2357.
  • Decoder extensions (FFmpeg, VP9, AV1, etc.):
    • Fix bug where DefaultTrackSelector.setAllowInvalidateSelectionsOnRendererCapabilitiesChange has no effect for audio decoder extensions #2258.
  • Cast extension:
    • Add support for setVolume(), and getVolume() #2279.
    • Prevent CastPlayer from entering STATE_BUFFERING while the timeline is empty.
    • Add support for getDeviceVolume(), setDeviceVolume(), getDeviceMuted(), and setDeviceMuted() #2089.
  • Test Utilities:
    • Add advance(player).untilPositionAtLeast and untilMediaItemIndex to TestPlayerRunHelper in order to advance the player until a specified position is reached. In most cases, these methods are more reliable than the existing untilPosition and untilStartOfMediaItem methods.
    • Move FakeDownloader to test-utils-robolectric module for reuse in other tests.
    • Removed transformer.TestUtil.addAudioDecoders(String...), transformer.TestUtil.addAudioEncoders(String...), and transformer.TestUtil.addAudioEncoders(ShadowMediaCodec.CodecConfig, String...). Use ShadowMediaCodecConfig to configure shadow encoders and decoders instead.
    • Replaced the "exotest" prefix with "media3" in codec names reported by ShadowMediaCodecConfig.
  • Remove deprecated symbols:
    • Removed deprecated SegmentDownloader constructor SegmentDownloader(MediaItem, Parser<M>, CacheDataSource.Factory, Executor) and the corresponding constructors in its subclasses DashDownloader, HlsDownloader and SsDownloader.
    • Removed deprecated Player.hasNext(), Player.hasNextWindow(). Use Player.hasNextMediaItem() instead.
    • Removed deprecated Player.next(). Use Player.seekToNextMediaItem() instead.
    • Removed deprecated Player.seekToPreviousWindow(). Use Player.seekToPreviousMediaItem() instead.
    • Removed deprecated Player.seekToNextWindow(). Use Player.seekToNextMediaItem() instead.
    • Removed deprecated BaseAudioProcessor in exoplayer module. Use BaseAudioProcessor under common module.
    • Remove deprecated MediaCodecVideoRenderer constructor MediaCodecVideoRenderer(Context, MediaCodecAdapter.Factor, MediaCodecSelector, long, boolean, @Nullable Handler, @Nullable VideoRendererEventListener, int, float, @Nullable VideoSinkProvider).

Changes since last stable 1.7.2 release include:

Bug Fixes

  • Update bazel toolchain:
    • bazel version 7.5.0
    • rules_jvm_external 6.7
    • rules_java 8.6.3
    • rules_kotlin 2.1.3
    • rules_android 0.6.3
  • Update dependencies to:
    • androidx.annotation 1.7.0a
    • kotlin 1.9.0

New Features

  • Adds @Supersedes to ServiceLoaderWrapper so it's possible to choose one implementation over another when multiple exist.

API Changes

  • Update to minSdkVersion 21
  • Make ReflectionException a RuntimeException

Bug Fixes

  • Fixed an error in NavController that caused a ConcurrentModificationException when using OnDestinationChangedListeners. If7406 b/417784831
  • Fixed an error when using navigate(uri, navOptions,navigationExtras) where the extras were being ignored. I67fb7 b/430336813

Parent-Child Hierarchy Support:

A NavigationEventDispatcher can now have parent and child dispatchers, forming a hierarchical tree structure. This enables navigation events to propagate and be managed more flexibly across complex Compose UI components by reflecting the UI’s structural hierarchy through chained dispatchers. I194ac

  // Create a parent dispatcher that will manage navigation events at a higher level.
  val parentDispatcher = NavigationEventDispatcher()

  // Create a child dispatcher linked to the parent, forming a hierarchy.
  val childDispatcher = NavigationEventDispatcher(parentDispatcher)

The hierarchical isEnabled property allows for top-down control of a dispatcher. When isEnabled is set to false on a dispatcher, it automatically disables all its descendant dispatchers. This feature enables entire branches of the navigation event system to be toggled off efficiently. I9e985

  // Disabling the child dispatcher disables all its callbacks and any of its children recursively.
  childDispatcher.isEnabled = false

Moreover, the isEnabled property on NavigationEventCallback now respects the enabled state of its associated dispatcher. This means a callback is considered enabled only if both the callback itself and its dispatcher (including its ancestors) are enabled, ensuring consistent hierarchical control over callback activation. I1799a

  // Create a test callback and add it to the child dispatcher.
  val callback1 = TestNavigationEventCallback(isEnabled = true)
  childDispatcher.addCallback(callback1)

  // Since the childDispatcher is disabled, the callback is effectively disabled as well.
  assertThat(callback1.isEnabled).isFalse()

A new dispose() method has been introduced for proper cleanup of dispatchers and their children. Calling dispose() stops listeners to prevent memory leaks, recursively disposes all child dispatchers, removes all callbacks registered to the dispatcher, and unlinks it from its parent. This guarantees resources are released correctly when dispatchers are no longer needed. I9e985

  // Dispose the child dispatcher to clean up resources.
  childDispatcher.dispose()

If any public method is called on a disposed dispatcher, an IllegalStateException is thrown immediately. This prevents silent failures and helps developers identify improper usage during development. Ic2dc3

  val callback2 = TestNavigationEventCallback()

  // Attempting to use a disposed dispatcher will throw an exception.
  assertThrows<IllegalStateException> {
      childDispatcher.addCallback(callback2)
  }

Note: We will introduce a new NavigationEventDispatcherOwner Composable that automatically manages a child dispatcher within Compose UI in aosp/3692572. However, this change did not make it into the current release cut and is planned for the next one.

Navigation Testing Library

  • Add navigationevent-testing module to provide dedicated testing utilities for the navigationevent library. 0e50b6
  • Add TestNavigationEventCallback fake utility class for testing. It records callback method calls and stores received NavigationEvent items to support verification. 4a0246
  • Add TestNavigationEvent fake utility function to create NavigationEvent instances with default values, simplifying unit tests for navigation event processing. 3b63f5
  • Add TestNavigationEventDispatcherOwner fake utility class for testing. It tracks fallback and enabled-state-changed event counts to support interaction verification in tests. c8753e

API Changes

  • Move NavigationEventInputHandler from androidMain to commonMain to make it available in KMP common code. Add new public send* methods for dispatching events. Change dispatch functions on NavigationEventDispatcher from public to internal; users must now use NavigationEventInputHandler to send events. Ia7114
  • Rename NavigationInputHandler to OnBackInvokedInputHandler. I63405

Bug Fixes

  • Refactor NavigationEventDispatcher to reduce overhead by avoiding intermediate list allocations and improving callback dispatch performance. I82702 I1a9d9
  • Add @FloatRange annotations to touchX, touchY, and progress fields in NavigationEvent to enforce valid value ranges at compile time and improve API safety. Iac0ec

Changes since last stable 1.5.1 release include:

Bug Fixes

  • Fix a bug where the instrumentation test application would not startup if the arguments passed to ORCHESTRATOR_FORWARDED_INSTRUMENTATION_ARGS contains spaces.
  • Update bazel toolchain:
    • bazel version 7.5.0
    • rules_jvm_external 6.7
    • rules_java 8.6.3
    • rules_kotlin 2.1.3
    • rules_android 0.6.3

API Changes

  • Update to minSdkVersion 21

API Changes

  • PagingData.from now allows setting placeholdersBefore and placeholdersAfter. Note that scrolling through these placeholders does not trigger loads. I06983

Changes since last stable 1.6.0 release include:

API Changes

  • ServiceTestRule.startService will now throw if the provided intent does not launch a service.

Bug Fixes

  • Update bazel toolchain:
    • bazel version 7.5.0
    • rules_jvm_external 6.7
    • rules_java 8.6.3
    • rules_kotlin 2.1.3
    • rules_android 0.6.3
  • Update dependencies to:
    • androidx.annotation 1.7.0

API Changes

  • Update to minSdkVersion 21

Changes since last stable 1.6.1 release include:

Bug Fixes

  • Update bazel toolchain:
    • bazel version 7.5.0
    • rules_jvm_external 6.7
    • rules_java 8.6.3
    • rules_kotlin 2.1.3
    • rules_android 0.6.3
  • Update dependencies to:
    • androidx.annotation 1.7.0
  • Exceptions during @AfterClass were not being reported via InstrumentationResultPrinter.
  • Exceptions arising in AndroidJUnitRunner.buildRequest are now handled.
  • Assumption failures during a ClassRule or BeforeClass are now reported more consistently via InstrumentationResultPrinter
  • Clarify SdkSuppress reference docs

API Changes

  • Update to minSdkVersion 21
  • Deprecate androidx.test.filters.Suppress in favor of org.junit.Ignore

Changes since last stable 1.5.0 release include:

New Features

  • StackTrimmer now reports suppressed exceptions
  • Adding a LocalSocket-based protocol for the ShellExecutor to talk to the ShellMain. This obsoletes SpeakEasy; if androidx.test.services is killed (e.g. by the low memory killer) between the start of the app_process that invokes LocalSocketShellMain and the start of the test, the test is still able to talk to LocalSocketShellMain.

Bug Fixes

  • Update bazel toolchain:
    • bazel version 7.5.0
    • rules_jvm_external 6.7
    • rules_java 8.6.3
    • rules_kotlin 2.1.3
    • rules_android 0.6.3
  • Update dependencies to:
    • androidx.annotation 1.7.0
  • The obsolete FileObserver protocol has been removed in favor of the LocalSocket-based protocol.
  • TestStorage: Use input directory location for internal files
  • StackTrimmer: harden against exceptions coming from Failure.getMessage().

API Changes

  • Update to minSdkVersion 21

Changes since last stable 1.6.0 release include:

Bug Fixes

  • Update bazel toolchain:
    • bazel version 7.5.0
    • rules_jvm_external 6.7
    • rules_java 8.6.3
    • rules_kotlin 2.1.3
    • rules_android 0.6.3
  • Update dependencies to:
    • androidx.annotation 1.7.0

API Changes

  • Update to minSdkVersion 21

Bug Fixes

  • TimePicker is now fully driven by the user's locale, using DateFormat.getBestDateTimePattern to determine the order and content of its pickers and separators. This fixes incorrect column ordering for CJK languages, resolves RTL layout issues in languages like Arabic, uses localized separators, and supports both 0-11 and 1-12 hour formats based on the locale I5d543
  • DatePicker now displays a numeric month in some locales, such as CJK, to avoid mixing numeric and linguistic formats (e.g., 2025 | 07 | 02 instead of 2025 | 7月 | 02). This change applies a heuristic that checks if the locale uses linguistic suffixes for the year and, if so, switches the month format from textual (MMM) to numeric (MM) for consistency. Ia93fe
  • The vertical space for the heading in the Picker component is now constant, preventing a visible shift when a picker column is selected, especially in Talkback mode. I7f8b7
  • Fixed an accessibility bug caused by HorizontalPageIndicator and VerticalPageIndicator being drawn full screen. The page indicators are no longer full-screen, and will be positioned automatically when used with HorizontalPagerScaffold or VerticalPagerScaffold. When not using a pager scaffold, specify the alignment explicitly using modifier = Modifier.align(Alignment.BottomCenter) with HorizontalPageIndicator and modifier =Modifier.align(Alignment.CenterEnd) with VerticalPageIndicator. I3a0ad
  • The swipe direction in SwipeToReveal is now consistent for both LTR and RTL LayoutDirections. I6d427
  • Reinstated SwipeToReveal vertical centering for actions. If hasPartiallyRevealedState = true, RevealState should be reset to RevealValue.Covered by the caller when scrolling occurs. I6473d
  • SwipeDismissableNavHost now correctly clips content for API 36 onwards. Ib9a44

Bug Fixes

  • TimePicker is now fully driven by the user's locale, using DateFormat.getBestDateTimePattern to determine the order and content of its pickers and separators. This fixes incorrect column ordering for CJK languages, resolves RTL layout issues in languages like Arabic, uses localized separators, and supports both 0-11 and 1-12 hour formats based on the locale I5d543
  • DatePicker now displays a numeric month in some locales, such as CJK, to avoid mixing numeric and linguistic formats (e.g., 2025 | 07 | 02 instead of 2025 | 7月 | 02). This change applies a heuristic that checks if the locale uses linguistic suffixes for the year and, if so, switches the month format from textual (MMM) to numeric (MM) for consistency. Ia93fe
  • The vertical space for the heading in the Picker component is now constant, preventing a visible shift when a picker column is selected, especially in Talkback mode. I7f8b7
  • Fixed an accessibility bug caused by HorizontalPageIndicator and VerticalPageIndicator being drawn full screen. The page indicators are no longer full-screen, and will be positioned automatically when used with HorizontalPagerScaffold or VerticalPagerScaffold. When not using a pager scaffold, specify the alignment explicitly using modifier = Modifier.align(Alignment.BottomCenter) with HorizontalPageIndicator and modifier =Modifier.align(Alignment.CenterEnd) with VerticalPageIndicator. I3a0ad
  • The swipe direction in SwipeToReveal is now consistent for both LTR and RTL LayoutDirections. I6d427
  • Reinstated SwipeToReveal vertical centering for actions. If hasPartiallyRevealedState = true, RevealState should be reset to RevealValue.Covered by the caller when scrolling occurs. I6473d
  • SwipeDismissableNavHost now correctly clips content for API 36 onwards. Ib9a44

Bug Fixes

  • Fix an issue where workers with identical network constraints as a previous worker would report their constraints not being met. b/427115602.

New Features

  • Add HandJointType and TrackingState. I55880 b/334645808
  • Make Config implementation public. I95860 b/334645808
  • Introduced new SessionCreateResult and SessionConfigureResult types. Icb8cb b/334645808
  • Add a new BoundingBox class that represents an axis-aligned bounding box in 3D space, defined by its minimum and maximum corner points. Ic68c5 b/423073468

API Changes

  • Renamed and moved androidx.xr.scenecore.PixelDimensions to androidx.xr.runtime.math.IntSize2d. Renamed and moved androidx.xr.scenecore.Dimensions to androidx.xr.runtime.math.FloatSize3d. Renamed androidx.xr.scenecore.PlaneType to androidx.xr.scenecore.PlaneOrientation. Renamed androidx.xr.scenecore.PlaneSemantic to androidx.xr.scenecore.PlaneSemanticType. Ifd405 b/416456228
  • Removed androidx.xr.runtime.FoV class. Use androidx.xr.runtime.FieldOfView instead. I9ae27
  • Added an additional overload for Session.create which can provide a LifecycleOwner for the Session to attach to. Note that an Activity will still need to be provided for resource ownership and the LifecycleOwner must be scoped within the Activity. I1690b
  • Renamed FakeRuntimeAnchor.anchorsCreated to anchorsCreatedCount I96df9 b/424441218
  • Config *Mode vals have been renamed to reflect their behavior. I6d247 b/414648065
  • Projects released with Kotlin 2.0 require KGP 2.0.0 or newer to be consumed Idb6b5 b/344563182
  • APIs related to manifest strings have been moved from :xr:runtime:runtime to :xr:runtime:runtime-manifest. The package name has changed from androidx.xr.runtime to androidx.xr.runtime.manifest. I610ad b/418800249
  • Session.resume(), Session.pause(), and Session.destroy() have been removed from the API surface. Session is no longer a LifecycleOwner. The Session's lifecycle will now be attached to the lifecycle of the Activity passed in Session.create(). I28a03
  • 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 b/326456246
  • The main Runtime artifact (:xr:runtime:runtime) will only contain Kolin-style async APIs. Java developers can depend on :xr:runtime:runtime-guava to access compatible APIs. I05d4a b/426639315
  • The main Runtime artifact (:xr:runtime:runtime) will only contain Kotlin-style async APIs. Java developers can depend on the xr:runtime:runtime-rxjava3 library to access compatible APIs. I64122 b/426639775
  • Move Coroutines to :xr:runtime:runtime-guava and Flows to :xr:runtime:runtime-rxjava3. I60ae9
  • Session.create and Session.configure now throw SecurityException when sufficient permissions have not been granted instead of returning SessionCreatePermissionsNotGranted or SessionConfigurePermissionsNotGranted. I7c488 b/430651879