Dependency Update
- Activity now depends on Navigation Event
1.0.0-alpha05.
New Features
- Add
getPrimaryHandSideso the developer could get the hand side info I270bd - Add geospatial check VPS availability API I58573
- Add ARCore API for
checkVpsAvailabilityIdbded stateFlowableextension functions added to:xr:arcore:arcore-rxjava3for usage by Java developers. I083aa b/427247794
API Changes
- Config
*Modevals 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-rxjava3library 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 thexr:arcore:arcore-guavalibrary to access compatible APIs. Iffcb4 b/422773524 Anchor.persistAsync()added toAnchorGuavafor usage by Java developers. I4af1c b/425984631Earth.createAnchorOnSurfaceAsync(Session, Double, Double, Double, Quaternion, Surface)added toEarthGuavafor usage by Java developers. I66357 b/425992992- Java developers will use the extension functions for
GltfModel.createAsyncinGltfModel.kt. Async functions inGltfModelwill 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 subscribeAsFlowableextension functions added to:xr:arcore:arcore-rxjava3for usage by Java developers. Id3e49 b/427277298
Important changes since 1.3.0
Microbenchmark
- Moved Gradle tasks
lockClocksandunlockClocksto be on benchmark projects, instead of at the top level to respect Gradle project isolation. - Refactored
BenchmarkRuleto be built on top of coroutines, and support betteryield()behavior. This should significantly reduce the risk of ANRs during benchmark runs, especially long CI runs. Note: UI Benchmarks should run withmeasureRepeatedOnMainThread
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
BaselineProfileRulenow 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 ofMacrobenchmarkmetrics, 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 aneditcall, please useTextFieldState.undoState.clearHistory(). I12c14
Breaking changes
- All public APIs tagged with
ExperimentalMaterial3ExpressiveApiorExperimentalMaterial3ComponentOverrideApihave been removed, please switch to1.5.0-alphato continue enjoying these features. Ie4ae0 - Please expect the following stabilized
pullToRefreshAPIs to be renamed in the next release. Ib6cbe
New Features
Tooltipnow 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
onDismisscallback. Ie3166 DatePickerState.getDisplayedMonth(): YearMonth?andDateRangePickerState.getDisplayedMonth(): YearMonth?were updated to return non nullable value. Ice09c b/427952972- Remove
ModalWideNavigationRailDefaults, move its contents toWideNavigationRailDefaultsand rename its shape related names. Ic5e61
Bug Fixes
- Ensures
DatePickerrespects its own locale for number formatting. Previously, ifDatePickerwas 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
LinearProgressIndicatorissue that did not render a stop indicator correctly in RTL layouts. I0734c PrimaryScrollableTabRowandSecondaryScrollableTabRowdivider 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
TextFieldColorsmethods to calculate component colors based on state are now public. I03165- Suspend annotation has been removed from
onDismisscallback. Ie3166 DatePickerState.getDisplayedMonth(): YearMonth?andDateRangePickerState.getDisplayedMonth(): YearMonth?were updated to return non nullable value. Ice09c b/427952972- Remove
ModalWideNavigationRailDefaults, move its contents toWideNavigationRailDefaultsand rename its shape related names. Ic5e61 WideNavigationRailItem’s colors and copy deprecated functions should be level Hidden. Id7e82- Change level of deprecated
WideNavigationRailapis to Warning and make them experimental. I89085
Bug Fixes
- Ensures
DatePickerrespects its own locale for number formatting. Previously, ifDatePickerwas 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
LinearProgressIndicatorissue that did not render a stop indicator correctly in RTL layouts. I0734c PrimaryScrollableTabRowandSecondaryScrollableTabRowdivider 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
targetPanetoreflowUnder. Ifa81b
Bug Fixes
- Fix performance regression caused by snapshoting the scaffold state transition progress I3d555 b/417329258
Bug Fixes
- Updates composition registration observer to be called before initial composition. I4adca b/430600932
Bug Fixes
- Fixes an issue where icons loaded via
painterResourcewith 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
onLayoutRectChangedmodifiers get called back initially. l9aa91, lb348a - Fix for an offset cache being incorrectly invalidated, causing
onLayoutRectChangedmodifiers to be called with wrong coordinates ibd4cd, lddc57 - Fix for rotated/skewed layouts receiving incorrect coordinates by
onLayoutRectChangedmodifiers lddc57 b/426750475
External Contribution
- Fixed an issue where
dragAndDropSourceitems inLazyListdisappear when scrolled. Thanks Victor Rendina! dc3bcd3 b/425894792
Changes since last stable release 1.6.0 include:
Bug Fixes
- Fix
Recthandling inViewCapturefor 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.0androidx.test.espresso:espresso-core:3.7.0androidx.test.espresso:espresso-contrib:3.7.0androidx.test.espresso:espresso-idling-resource:3.7.0androidx.test.espresso:espresso-intents:3.7.0androidx.test.espresso:espresso-remote:3.7.0androidx.test.espresso:espresso-web:3.7.0androidx.test.espresso.idling:idling-concurrent:3.7.0androidx.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
SubspaceComposableannotation class public. Ic2a34 b/399432430 - Two new
SpatialExternalSurfaceComposables representing 180 and 360 degree spheres. I40ef2 b/391705799 - Added
SubspaceModifier.aspectRatioIde5ab b/399729509 b/414762147 - Added the
SceneCoreEntityAPI to improve interoperability betweenSceneCoreand Compose for XR. I50bb3 b/423020989 - Provided
GravityAlignedsubspaceAPI to support the unscaled AndGravityAlignedfeature I07359
API Changes
SpatialDialog()will followSpatialDialogProperties.dismissOnBackpress configuration. Ib453b b/416797132- Update
minimumPanelDimensionto a new default Dimension size ofDimensions(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
SpatialDialogswill now retain their state when the app is in the background. I6aa56ApplicationSubspacewill 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
SubspaceComposableis used in a non-SubspaceComposablecontext. Iee2ae b/416484684 - Updating
ExperimentalSubspaceVolumeApifrom Warning to Error because warnings are often overlooked when misusing composable APIs. I427aa b/424864286 - Subspace and
ApplicationSubspaceare now constrained byrecommendedContentBoxInFullSpace. Previously it was constrained bySpatialUser's Field of View. I41015 b/423074142 - Update
SpatialElevationto use min size to no longer use hard coded size I2dbe6 b/427785338 - Update how we scrim the
SpatialAcitivityPanelto update when a key variable is modified. I0f64d b/427999029 - Remove
VolumeConstraints.Unboundedin favor of setting the default constraint values to the equivalent. Ie24ec b/407938414 SpatialFeatheringSizeis no longer public I1c15b b/399432430- Renamed the XR
PlaceabletoSubspacePlaceableto distinguish it from Compose'sPlaceable. I74874 - Removing Orbiter settings and adding
shouldRenderInNonSpatialas a new param. In addition, removing classEdgeOffsetand addingorbiterOffsetTypeas a new param to consolidateOrbiter()Functions. As well as renamingOrbiterEdgetoContentEdge. Iebf3d - Renamed
MeasurabletoSubspaceMeasurableto differentiate the type from Compose'sMeasurabletype. I9726c - Rename
MeasureResulttoSubspaceMeasureResultI9f34d - Removed the
setSubspaceContentAPI in favor of using Compose'ssetContentwith aSubspacecomposable. Ifff4c b/421427391 b/421427391 MeasurePolicyis renamed toSubspaceMeasurePolicy. I37a9b b/422553904- Turn
SubspaceSemanticsInfointo a sealed interface because we won't be able to add members without the defaults. I372f9 b/423704068 - Updated
SpatialExternalSurfacedocumentation, renamedContentSecurityLeveltoSurfaceProtectionI3c460 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
CoreEntityas aPublishedApiIfee05
Bug Fixes
- Fixed issue where
SpatialDialogwould flash when being rendered. Ife73c b/401619909 - Fixes issue where
SpatialDialogcould not scrim the Activity Panel. I8ca6c b/367442109 - Fix XR dialog not showing some content I17cd5 b/418062437
- Fixed issue where
SpatialPopupwas 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
topBaroverlapping with menu inSpatialComposeVideoPlayerId33bc b/427168167 - Fixed corner radius not rendering I975fe b/428261830
New Features
- Perceived Resolution API added to Panel Entities and
SurfaceEntities. I118f6 PerceivedResolutionCallback methods added to Scene.kt to monitor the perceived resolution of the main panel of the activity in HSM. I58084SurfaceEntity- Support added for Application to request super sampling at creation time. This allows applications to use super sampling filter for anti-aliasing. I06913- Added
recommendedContentBoxInFullSpaceproperty 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.PixelDimensionstoandroidx.xr.runtime.math.IntSize2d;androidx.xr.scenecore.Dimensionstoandroidx.xr.runtime.math.FloatSize3d;androidx.xr.scenecore.ActivityPosetoScenePose,androidx.xr.scenecore.ContentlessEntitytoGroupEntity,androidx.xr.scenecore.PlaneTypetoPlaneOrientation;androidx.xr.scenecore.PlaneSemantictoPlaneSemanticType. Ifd405I3b622 If534d - A number of setters for
Scene's properties have been made private; they were not intended to be mutated bySceneCoreclients:activitySpace,activitySpaceRoot,mainPanelEntity,perceptionSpace,spatialCapabilities,spatialEnvironment, andspatialUser. I2f506 - In Entity: Changed the following to properties:
get/setParent(),setContentDescription; DeprecatedEntity.is/setHidden(), useEntity.is/setEnabledinstead. Ibc4c6 - Removed the
androidx.xr.scenecore.BasePanelEntityclass, usePanelEntitydirectly instead. Replaced getters and setters forPanelEntitywith properties. ChangedPanelEntity.sizeproperty fromFloat3dSizetoFloat2dSize. Remmoved the deprecated methodandroidx.xr.scenecore.PanelEntity.getPixelDimensions, usegetSizeInPixelsinstead. Icc174 - Replaced
androidx.xr.scenecore.OnSpaceUpdatedListenerwithRunnable. I19308 - Replaced
SpatialUser.getCameraViews()with a property. Ib0cc5 ForExrImageandGltfModel:Changedcreatemethods to be suspend functions; modified create parameters to accept aUriorPathinstead of aString. Id8883 I0d247, I25706 - Moved
SpatialEnvironment.requestFullSpaceModeandSpatialEnvironment.requestHomeSpaceModeto Scene, for example usesession.scene.requestFullSpaceMode()instead ofsession.scene.spatialEnvironment.requestFullSpaceMode().addOnPassthroughOpacityChangedListenerandaddOnSpatialEnvironmentChangedListenernow have overrides that accept optional Executors. I12fe0 I6b21e - Removed the following deprecated
SpatialEnvironmentmethods:togglePassthrough,setPassthrough,setPassthroughOpacity,getPassthroughMode,getPassthroughOpacity,setSkybox, andsetGeometry. Also removed deprecated classSpatialEnvironment.PassthroughModeI927bd I927bd I927bd - Replaced the following
SpatialEnvironmentgetters and setters with Kotlin properties:getCurrentPassthroughOpacity(),get/setPassthroughOpacityPreference(),get/setSpatialEnvironmentPreference(),isSpatialEnvironmentPreferenceActive()I33a7b Ie06e2 Ie06e2 SpatialEnvironmentPreference.preferredPassthroughOpacitytype changed fromFloat?toFloat. It no longer accepts null values. Instead,SpatialEnvironment.NO_PASSTHROUGH_OPACITY_PREFERENCEis used to signal that there's no opacity preference. I40107- Updated the
windowBoundsPxparameter topixelDimensionsand its type from Rect toIntSize2din the create method. I1926e SpatialEnvironmentconstructor is now internal I75a51- Replaced class
SpatialPointerIconNoneandSpatialPointerIconCircleclasses with companion objectsSpatialPointerIcon.NONEandSpatialPointerIcon.CIRCLEI416d2 SpatialPointerIconinSpatialPointerComponentis no longer nullable. UseSpatialPointerIcon.DEFAULTinstead 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.OnStateChangedListenerforAnchorEntitywithConsumer<AnchorEntity.State>. I472e0 GltfModelEntity.getAnimationState()is now a property. I10b29- Replaced
ActivitySpace.getBounds()with a property. RenamedActivitySpace.addBoundsChangedListenertoActivitySpace.addOnBoundsChangedListener. ReplacedActivitySpace.setOnSpaceUpdatedListenerwith add/remove methods. I4c956 - For
AnchorPlacement: planeTypeFilterwas renamed toanchorablePlaneOrientations,planeSemanticFilterwas renamed toanchorablePlaneSemanticTypes. Add aMovableComponentto anAnchorEntityorActivitySpacewill return false,MoveListenerwas renamed toEntityMoveListener shouldDisposeParentAnchorwas renamed todisposeParentOnReAnchor systemMovablewas removed from thecreatefunction in favor ofcreeateCustomMovable,createSystemMovableandcreateAnchorableIf11c4 - Removed
SurfaceEntity.featherRadiusX/Yand adds anEdgeFeatheringParamsclass concept. Ic78fc PanelEntity.enablePanelDepthTest()method replaced withpanelClippingConfigproperty. SetScene.panelClippingConfig = PanelClippingConfig(isDepthTestEnabled = true)to enable depth-testing or set it toPanelClippingConfig(isDepthTestEnabled = false)to disable it. I0cbe0Scene.mainPanelEntityis now of typeMainPanelEntityinstead ofPanelEntityI7125a- Renamed Scene's
setFullSpaceModemethod toconfigureBundleForFullSpaceModeLaunchandsetFullSpaceModeWithEnvironmentInheritedmethod 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 SpatialVisibilityclass replaced with public object with const Int values.setSpatialVisibilityChangedListenernow accepts aConsumer<Int>instead ofConsumer<SpatialVisibility>Ie7e8cPointerCaptureComponentconstants renamed and moved toPointerCaptureComponent.PointerCaptureStateobject I9c7ac- Replaced
PointerCaptureComponents' StateListenerwithConsumer<Int>. I9c7ac - Replaced
InputEventListenerwithConsumer<InputEvent>I9c7ac setPreferredAspectRatiomoved from Scene class toSpatialWindowobject and takes in Session as first parameter. I7b717Entity.setHidden()replaced byEntity.setEnabled()andEntity.isHidden()replaced byEntity.isEnabled().setHidden(false)is equal tosetEnabled(true)andisHidden() == !isEnabled(). Icf0deEntity.contentDescriptiontype changed from String toCharSequence. Ie59beSession.createandSession.configurenow throwSecurityExceptionwhen sufficient permissions have not been granted instead of returningSessionCreatePermissionsNotGrantedorSessionConfigurePermissionsNotGranted. I7c488ResizableComponent.createnow requires aConsumer<ResizeEvent> ResizeEventListenerwas replaced withConsumer<ResizeEvent> ResizableComponent.sizewas renamed toResizableComponent.affordanceSize ResizableComponent.minimumSizewas renamed toResizableComponent.minimumEntitySize ResizableComponent.maximumSizewas renamed toResizableComponent.maximumEntitySize,ResizableComponent.autoHideContentwas renamed toResizableComponent.shouldAutoHideContentResizableComponent.forceShowResizeOverlaywas renamed toResizableComponent.shouldAlwaysShowOverlayI97a2d- Reduced
minSDKto 24 forandroidx.xr.scenecoreandandroidx.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
SceneCoreartifact (xr:scenecore:scenecore) will only contain Kotlin-style async APIs. Java developers can depend on thexr:scenecore:scenecore-guavalibrary 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
ListenableFuturehave 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,GuavaExrImagecontains the Guava-equivalent ExrImage async functions,GuavaScenePosecontains the Guava-equivalentScenePoseasync functions,GuavaGltfModelcontains theGuava-equivalent GltfModelasync functions, etc. If7283 I0af60 If7283 Ia8515 I4efdf I54bbf I3467a I82a33
Bug Fixes
- Updated Jetpack XR Scenecore
ProGuardrule to preventAbstractMethodErrorfor minified clients. I91a01 - Additional fixes to support Proguard minification for Jetpack XR
SceneCoreI4f47e - Fixed a bug where an
InteractableComponentmay cause a crash if thehitPositionon the HitInfo of theInputEventmay crash if thehitPositionreturned from the system was null I7a695 - Config *Mode vals have been renamed to reflect their behavior. I6d247
- Fixed issues with FOV and
HitTestinSceneCoreTestApp. 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_BOTTOMupdated 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.ActivityTestRulein 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
LifecycleOwnercomposable 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
SavedStateHandleconstructors as@VisibleForTesting. Iff0e0 b/408002794
- Common Library:
- Add support for replacing the player in
ForwardingSimpleBasePlayer.
- Add support for replacing the player in
- ExoPlayer:
- Add getter for shuffle mode to the
ExoPlayerinterface #2522. - More clearly throw an exception if
DefaultAudioSinkis accessed from multiple threads. If this happens due to a call toRendererCapabilities.getFormatSupportoutside 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_ONLYflag (which is enabled by default in scrubbing mode). - Add support for using the virtual device ID from the
Contextpassed toExoPlayer.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_ONLYby default in scrubbing mode. - Throw
IllegalStateExceptionwhenPreloadMediaSourceis played by anExoPlayerwith a playback thread that is different than the preload thread #2495. - Add
cloneAndMovetoShuffleModewith a default implementation #2226. - Change default behavior of
Renderer.getMinDurationToProgressUsto return a larger value if no call torenderis 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.experimentalSetDynamicSchedulingEnabledis 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 withsetScrubbingModeParameters(..)onExoPlayerandExoPlayer.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
AdsMediaSourcemay be never reported #2337. - Fix memory leak in
MergingMediaSource, for example used when sideloading subtitles #2338. - Allow
CmcdConfiguration.Factoryto returnnullto 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
PreCacheHelperthat allows apps to pre-cache a single media with specified start position and duration. - Add support of preloading from specified position in
DefaultPreloadManager.
- Add getter for shuffle mode to the
- Transformer:
- Add
CodecDbLitethat enables chipset specific optimizations of video encoding settings. - Add
setEnableCodecDbLiteflag to theDefaultEncoderFactoryto 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 settingexperimentalSetForceAudioTrack(true)inEditedMediaItemSequence.Builder. If the gap is in the middle of the sequence, then this flag is not required. - Move
Muxerinterface frommedia3-transformertomedia3-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
VideoCompositorSettingsto arrange sequences into a 2x2 or PiP layout.
- Add
- 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
sidxatoms. This behavior can be enabled using theFLAG_MERGE_FRAGMENTED_SIDXflag onFragmentedMp4Extractor#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
WavExtractorto use the header extension's SubFormat data for the audio format when parsing aWAVE_FORMAT_EXTENSIBLEtype file. - MP4: Add support for
ipcmandfpcmboxes defining raw PCM audio tracks (64-bit floating point PCM is not supported). - MP4: Handle the rotation part of
tkhdtransformation 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.onAudioPositionAdvancingis 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
ChannelMappingAudioProcessorandTrimmingAudioProcessor. - Add support for audio gaps in
CompositionPlayer. - Remove spurious call to
BaseAudioProcessor#flush()fromBaseAudioProcessor#reset(). - Allow constant power upmixing/downmixing in DefaultAudioMixer.
- Make
ChannelMappingAudioProcessor,TrimmingAudioProcessorandToFloatPcmAudioProcessorpublic #2339. - Use
AudioTrack#getUnderrunCount()inAudioTrackPositionTrackerto detect underruns inDefaultAudioSinkinstead 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.onAudioPositionAdvancingwas 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.
- Fix bug where
- 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
ExoPlayerAPI to include theMediaCodec.BUFFER_FLAG_DECODE_ONLYflag 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 withDefaultRenderersFactory.experimentalSetEnableMediaCodecBufferDecodeOnlyFlag. * Improve codec performance checks for software video codecs. This may lead to some additional tracks being marked asEXCEEDS_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/SSAin Matroska files. PreviouslyMatroskaExtractoronly supportedCodecId = S_TEXT/ASSwhich 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
layerproperty 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
TimelinetoMetadataRetrieverand migrated it to an instance-based,AutoCloseableAPI. Use the newBuilderto create an instance for aMediaItem, then callretrieveTrackGroups(),retrieveTimeline(), andretrieveDurationUs()to getListenableFutures for the metadata. The previous static methods are now deprecated #2462.
- Added support for retrieving media duration and
- Image:
- Limit decoded bitmaps to the display size in
BitmapFactoryImageDecoder, to avoid an app crashing withCanvas: trying to draw too large bitmap.fromPlayerViewwhen trying to display very large (e.g. 50MP) images. - Change the signature of
DefaultRenderersFactory.getImageDecoderFactory()to take aContextparameter. - Align the max bitmap output size used in
CompositionPlayerwith that already used inTransformer(meaningCompositionPlayerdoes not consider the display size when decoding bitmaps, unlikeExoPlayer).
- Limit decoded bitmaps to the display size in
- DRM:
- Add new overload of
OfflineLicenseHelper.newWidevineInstanceaccepting aMediaItem.DrmConfigurationso that HTTP request headers can be applied correctly #2169.
- Add new overload of
- Effect:
- Add
Presentation.createForShortSide(int)that creates aPresentationthat ensures the shortest side always matches the given value, regardless of input orientation.
- Add
- Muxers:
- Fix a bug where correct sample flags were not set for audio samples in fragmented MP4.
writeSampleData()API now uses muxer specificBufferInfoclass instead ofMediaCodec.BufferInfo.- Add
Muxer.Factory#supportsWritingNegativeTimestampsInEditListwhich 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
MediaPeriodQueueanymore #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
setSessionExtrasfrom the main thread when running the player from a different application thread then the main thread caused anIllegalStateException#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
PlaybackExceptionfor all or selected controllers. - Fix bug where seeking in a live stream on a
MediaControllercan cause anIllegalArgumentException. - 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
getLibraryRootof aMediaBrowserconnected to a legacyMediaBrowserServiceCompatproduced aNullPointerException. - 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.uriwas shared to the platform sessions'sMediaMetadata. To intentionally share a URI to allow controllers to re-request the media, setMediaItem.RequestMetadata.mediaUriinstead.
- UI:
- Fix bug where
PlayerSurfaceinside re-usable components likeLazyColumndidn'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-composemodule forSeekBackButtonStateandSeekForwardButtonState. - 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 aplayer.seekTocall for every movement, and then exits scrubbing mode when the touch is lifted from the screen. This integration can be enabled with eithertime_bar_scrubbing_enabled = truein XML or thesetTimeBarScrubbingEnabled(boolean)method from Java/Kotlin. - Make
PlayerSurfaceaccept a nullablePlayerargument.
- Fix bug where
- Downloads:
- Add partial download support for progressive streams. Apps can prepare a progressive stream with
DownloadHelper, and request aDownloadRequestfrom the helper with specifying the time-based media start and end positions that the download should cover. The returnedDownloadRequestcarries the resolved byte range, with which aProgressiveDownloadercan be created and download the content correspondingly. - Add
DownloadHelper.Factorywith which the staticDownloadHelper.forMediaItem()methods are replaced. - Add
FactoryforSegmentDownloaderimplementations. - Add partial download support for adaptive streams. Apps can prepare an adaptive stream with
DownloadHelper, and request aDownloadRequestfrom the helper with specifying the time-based media start and end positions that the download should cover. The returnedDownloadRequestcarries the resolved time range, with which a concreteSegmentDownloadercan be created and download the content correspondingly.
- Add partial download support for progressive streams. Apps can prepare a progressive stream with
- Cronet extension:
- Add automatic cookie handling #5975.
- HLS extension:
- Fix bug where
HlsSampleStreamWrapperattempts 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=YESis 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.
- Fix bug where
- 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.
- Fix issue where trick-play adaptation set is merged with its main adaptation set to form an invalid
- RTSP extension:
- Decoder extensions (FFmpeg, VP9, AV1, etc.):
- Fix bug where
DefaultTrackSelector.setAllowInvalidateSelectionsOnRendererCapabilitiesChangehas no effect for audio decoder extensions #2258.
- Fix bug where
- Cast extension:
- Test Utilities:
- Add
advance(player).untilPositionAtLeastanduntilMediaItemIndextoTestPlayerRunHelperin order to advance the player until a specified position is reached. In most cases, these methods are more reliable than the existinguntilPositionanduntilStartOfMediaItemmethods. - Move
FakeDownloadertotest-utils-robolectricmodule for reuse in other tests. - Removed
transformer.TestUtil.addAudioDecoders(String...),transformer.TestUtil.addAudioEncoders(String...), andtransformer.TestUtil.addAudioEncoders(ShadowMediaCodec.CodecConfig, String...). UseShadowMediaCodecConfigto configure shadow encoders and decoders instead. - Replaced the "exotest" prefix with "media3" in codec names reported by
ShadowMediaCodecConfig.
- Add
- Remove deprecated symbols:
- Removed deprecated
SegmentDownloaderconstructorSegmentDownloader(MediaItem, Parser<M>, CacheDataSource.Factory, Executor)and the corresponding constructors in its subclassesDashDownloader,HlsDownloaderandSsDownloader. - Removed deprecated
Player.hasNext(),Player.hasNextWindow(). UsePlayer.hasNextMediaItem()instead. - Removed deprecated
Player.next(). UsePlayer.seekToNextMediaItem()instead. - Removed deprecated
Player.seekToPreviousWindow(). UsePlayer.seekToPreviousMediaItem()instead. - Removed deprecated
Player.seekToNextWindow(). UsePlayer.seekToNextMediaItem()instead. - Removed deprecated
BaseAudioProcessorinexoplayermodule. UseBaseAudioProcessorundercommonmodule. - Remove deprecated
MediaCodecVideoRendererconstructorMediaCodecVideoRenderer(Context, MediaCodecAdapter.Factor, MediaCodecSelector, long, boolean, @Nullable Handler, @Nullable VideoRendererEventListener, int, float, @Nullable VideoSinkProvider).
- Removed deprecated
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
NavControllerthat caused aConcurrentModificationExceptionwhen usingOnDestinationChangedListeners. If7406 b/417784831 - Fixed an error when using
navigate(uri, navOptions,navigationExtras)where the extras were being ignored. I67fb7 b/430336813
Dependency Update
- Navigation3 now depends on Navigation Event
1.0.0-alpha05.
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-testingmodule to provide dedicated testing utilities for thenavigationeventlibrary. 0e50b6 - Add
TestNavigationEventCallbackfake utility class for testing. It records callback method calls and stores receivedNavigationEventitems to support verification. 4a0246 - Add
TestNavigationEventfake utility function to createNavigationEventinstances with default values, simplifying unit tests for navigation event processing. 3b63f5 - Add
TestNavigationEventDispatcherOwnerfake utility class for testing. It tracks fallback and enabled-state-changed event counts to support interaction verification in tests. c8753e
API Changes
- Move
NavigationEventInputHandlerfromandroidMaintocommonMainto make it available in KMP common code. Add newpublic send*methods for dispatching events. Change dispatch functions onNavigationEventDispatcherfrompublictointernal; users must now useNavigationEventInputHandlerto send events. Ia7114 - Rename
NavigationInputHandlertoOnBackInvokedInputHandler. I63405
Bug Fixes
- Refactor
NavigationEventDispatcherto reduce overhead by avoiding intermediate list allocations and improving callback dispatch performance. I82702 I1a9d9 - Add
@FloatRangeannotations totouchX,touchY, andprogressfields inNavigationEventto 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_ARGScontains 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.fromnow allows settingplaceholdersBeforeandplaceholdersAfter. Note that scrolling through these placeholders does not trigger loads. I06983
Changes since last stable 1.6.0 release include:
API Changes
ServiceTestRule.startServicewill 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
@AfterClasswere not being reported viaInstrumentationResultPrinter. - 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
API Changes
- Add native support for nullable types in
SavedStateRegistryOwner.saved, simplifying saving and restoring nullable properties. Ia632 b/421325690
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
Bug Fixes
- Fixed crash happening when the View is attached to a Window with a null
windowId. I2ddf6
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
TimePickeris now fully driven by the user's locale, usingDateFormat.getBestDateTimePatternto 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 I5d543DatePickernow 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
Talkbackmode. I7f8b7 - Fixed an accessibility bug caused by
HorizontalPageIndicatorandVerticalPageIndicatorbeing drawn full screen. The page indicators are no longer full-screen, and will be positioned automatically when used withHorizontalPagerScaffoldorVerticalPagerScaffold. When not using a pager scaffold, specify the alignment explicitly usingmodifier = Modifier.align(Alignment.BottomCenter)withHorizontalPageIndicatorandmodifier =Modifier.align(Alignment.CenterEnd)withVerticalPageIndicator. I3a0ad - The swipe direction in
SwipeToRevealis now consistent for both LTR and RTLLayoutDirections. I6d427 - Reinstated
SwipeToRevealvertical centering for actions. IfhasPartiallyRevealedState = true,RevealStateshould be reset toRevealValue.Coveredby the caller when scrolling occurs. I6473d SwipeDismissableNavHostnow correctly clips content for API 36 onwards. Ib9a44
Bug Fixes
TimePickeris now fully driven by the user's locale, usingDateFormat.getBestDateTimePatternto 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 I5d543DatePickernow 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
Talkbackmode. I7f8b7 - Fixed an accessibility bug caused by
HorizontalPageIndicatorandVerticalPageIndicatorbeing drawn full screen. The page indicators are no longer full-screen, and will be positioned automatically when used withHorizontalPagerScaffoldorVerticalPagerScaffold. When not using a pager scaffold, specify the alignment explicitly usingmodifier = Modifier.align(Alignment.BottomCenter)withHorizontalPageIndicatorandmodifier =Modifier.align(Alignment.CenterEnd)withVerticalPageIndicator. I3a0ad - The swipe direction in
SwipeToRevealis now consistent for both LTR and RTLLayoutDirections. I6d427 - Reinstated
SwipeToRevealvertical centering for actions. IfhasPartiallyRevealedState = true,RevealStateshould be reset toRevealValue.Coveredby the caller when scrolling occurs. I6473d SwipeDismissableNavHostnow 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
HandJointTypeandTrackingState. I55880 b/334645808 - Make Config implementation public. I95860 b/334645808
- Introduced new
SessionCreateResultandSessionConfigureResulttypes. Icb8cb b/334645808 - Add a new
BoundingBoxclass 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.PixelDimensionstoandroidx.xr.runtime.math.IntSize2d. Renamed and movedandroidx.xr.scenecore.Dimensionstoandroidx.xr.runtime.math.FloatSize3d. Renamedandroidx.xr.scenecore.PlaneTypetoandroidx.xr.scenecore.PlaneOrientation. Renamedandroidx.xr.scenecore.PlaneSemantictoandroidx.xr.scenecore.PlaneSemanticType. Ifd405 b/416456228 - Removed
androidx.xr.runtime.FoVclass. Useandroidx.xr.runtime.FieldOfViewinstead. I9ae27 - Added an additional overload for
Session.createwhich can provide aLifecycleOwnerfor the Session to attach to. Note that an Activity will still need to be provided for resource ownership and theLifecycleOwnermust be scoped within the Activity. I1690b - Renamed
FakeRuntimeAnchor.anchorsCreatedtoanchorsCreatedCountI96df9 b/424441218 - Config
*Modevals 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:runtimeto:xr:runtime:runtime-manifest. The package name has changed fromandroidx.xr.runtimetoandroidx.xr.runtime.manifest. I610ad b/418800249 Session.resume(),Session.pause(), andSession.destroy()have been removed from the API surface. Session is no longer aLifecycleOwner. The Session's lifecycle will now be attached to the lifecycle of the Activity passed inSession.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-guavato 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 thexr:runtime:runtime-rxjava3library to access compatible APIs. I64122 b/426639775 - Move Coroutines to
:xr:runtime:runtime-guavaand Flows to:xr:runtime:runtime-rxjava3. I60ae9 Session.createandSession.configurenow throwSecurityExceptionwhen sufficient permissions have not been granted instead of returningSessionCreatePermissionsNotGrantedorSessionConfigurePermissionsNotGranted. I7c488 b/430651879