2025-05-07
Annotation-Experimental: v1.5.0
May 7, 2025
androidx.annotation:annotation-experimental:1.5.0 is released. Version 1.5.0 contains these commits.
Important changes since 1.4.0
- Added
messagetoRequiresOptInto match the Kotlin stdlib annotation with default empty string value. (I1f50e) - This library now targets Kotlin 2.0 language level and requires KGP 2.0.0 or newer. (Idb6b5)
appfunctions: v1.0.0-alpha01
May 7, 2025
androidx.appfunctions:appfunctions:1.0.0-alpha01, androidx.appfunctions:appfunctions-compiler:1.0.0-alpha01, and androidx.appfunctions:appfunctions-service:1.0.0-alpha01 are released. Version 1.0.0-alpha01 contains these commits.
New Features
The AppFunctions Jetpack library is built on top of android.app.appfunctions platform APIs. This library simplifies exposing your app's functionality to the Assistant and allows the Assistant to interact with the app's exposed functions.
androidx.appfunctions:appfunctions: Core client APIs for managing (enable/disable) and interacting with (search/execute)AppFunctions.androidx.appfunctions:appfunctions-service: Service-side APIs to easily expose your app's functionalities asAppFunctions.androidx.appfunctions:appfunctions-compiler: Required KSP compiler to generate necessary code for exposingAppFunctions.
Benchmark: v1.4.0-beta01
May 7, 2025
androidx.benchmark:benchmark-*:1.4.0-beta01 is released. Version 1.4.0-beta01 contains these commits.
API Changes
- Added
PerfettoTraceRuleconstructor variant which accepts aPerfettoConfig(Ie53ba)
Bug Fixes
- Updated
TraceProcessorstartup insight link format to use correct plugin, and clearer delimeter (:is shorter than%3A, and both are supported) (Ie18ef) - Always use force-stop to kill processes, even when rooted and killing system apps. Fixes exceptions of the form:
Expected no stdout/stderr from killall ... No such process. (Idca2c)
External Contribution
- Added proxy exception handler for
TraceProcessorHttpServer(I480f5)
Camera: v1.5.0-beta01
May 7, 2025
androidx.camera:camera-*:1.5.0-beta01 is released. Version 1.5.0-beta01 contains these commits.
API Changes
- Projects released with Kotlin 2.0 require KGP 2.0.0 or newer to be consumed (Idb6b5)
ContentScaleand Alignment can now be used in the viewfinder to scale and place the displayed surface within its container, similar to howandroidx.compose.foundation.Imagebehaves. (Ibcea3)TransformationInfonow has default values for all args. This will allow Viewfinders to be created without anyTransformationInfo, which will default to a source rotation of 0, no source mirroring, and no crop rect. (I2b1b2)- Added
LifecycleCameraProvider, which is a camera provider that can be instantiated with different configurations for features such as accessing the camera of a virtual device by configuring with a customized context. (Ia2992)
Bug Fixes
- Fixed preview freeze issue when using
ImageAnalysiswith another stream that usesTEMPLATE_RECORDon Samsung SM-E556B device. (Ic0e62, b/409478042) - Fixed preview freeze issue when using
ImageAnalysiswith another stream that usesTEMPLATE_RECORDon Samsung SM-M556B device. (Ic1a6a, b/395822788) - Fixed Extensions NIGHT mode
AssertErrorissue on Android 15 Pixel devices when doing zoom related operations. (I27a5d, b/401460276) - Fix ML Kit Analyzer incorrect bounding box coordinates issue when using
CameraController. (Iae91b, b/409808510)
camera media3: v1.0.0-alpha03
May 7, 2025
androidx.camera.media3:media3-effect:1.0.0-alpha03 is released. Version 1.0.0-alpha03 contains these commits.
Bug Fixes
- Fixed the cameraX media3-effect crash when using with media3 1.6 dependency (Ic1ff1)
camera viewfinder: v1.5.0-beta01
May 7, 2025
androidx.camera.viewfinder:viewfinder-compose:1.5.0-beta01, androidx.camera.viewfinder:viewfinder-core:1.5.0-beta01, and androidx.camera.viewfinder:viewfinder-view:1.5.0-beta01 are released. Version 1.5.0-beta01 contains these commits.
- This is the first official beta release of the view-based and compose-based viewfinders that are flexible enough to be used with Camera2. If you’re looking for a View or composable to use with CameraX, see
PreviewViewandCameraXViewfinder.
New Features
ContentScaleandAlignmentcan now be used in the compose-based viewfinder to scale and place the displayed surface within its container, similar to howandroidx.compose.foundation.Imagebehaves. (Ibcea3)
API Changes
TransformationInfonow has default values for all args. This will allow Viewfinders to be created without anyTransformationInfo, which will default to a source rotation of 0, no source mirroring, and no crop rect. (I2b1b2)- Composable Viewfinder now takes a trailing lambda to receive a Surface session, similar to
AndroidExternalSurface. The provided lambda usesViewfinderInitScopeas a receiver, which allows installing a callback to receive new Surface sessions. These surface sessions automatically release resources held by the Viewfinder when they go out of scope. (Ib2b0d) ViewfinderSurfaceRequest.Builder.populateFromCharacteristicshas now been removed and is now replaced with an equivalent set of static APIs that can be used to generateTransformationInfowhich will produce the same transformation aspopulateFromCharacteristics. These static methods are added to theCamera2TransformationInfoclass. (Idc6af)ViewfinderSurfaceRequestno longer includes async APIs for retrieving the surface. It is now an immutable data type. APIs for retrieving the Surface are now moved to the viewfinder. (I30127)CameraViewfinderhas been renamed toViewfinderViewso that the naming aligns with the naming of the Viewfinder composable and to indicate that it can be used with more than just camera sources. (Id9e6b)- Classes from
viewfinder-viewhave been moved to theandroidx.camera.viewfinder.viewsubpackage from theandroidx.camera.viewfinderpackage. (I6cb44) - New APIs are added to view-based Viewfinder that allow setting the source rotation, mirroring, and crop rectangle. This
TransformationInfoclass is the same class used by the compose-based Viewfinder. (I907c3) - The view-based Viewfinder now uses new
ViewfinderSurfaceRequestAPIs which no longer internally handle the Surface response. Instead of returningListenableFuture<Surface>, therequestSurfaceSession()APIs now returnListenableFuture<ViewfinderSurfaceSession>which returns anAutoCloseableclass that when closed behaves the same way as calling the old API ofViewfinderSurfaceRequest.markSurfaceSafeToRelease(). This provides a clearer separation of responsibilities between the surface request and surface response. (I19041)
Compose Animation: v1.8.1
May 7, 2025
androidx.compose.animation:animation-*:1.8.1 is released. Version 1.8.1 contains these commits.
External Contribution
- End animations in
SeekableTransitionStateif already past new duration. Thanks Steven Schoen! (fbcdf7)
Compose Animation: v1.9.0-alpha02
May 7, 2025
androidx.compose.animation:animation-*:1.9.0-alpha02 is released. Version 1.9.0-alpha02 contains these commits.
New Features
- Much improved support for scrolling or dragging in shared elements. More specifically, when a transitioning shared element is being scrolled, the scroll delta will be directly applied to the shared element rather than causing the shared elements to chase the new target. (cacf7b)
Compose Foundation: v1.8.1
May 7, 2025
androidx.compose.foundation:foundation-*:1.8.1 is released. Version 1.8.1 contains these commits.
Bug Fixes
- Fixed a bug in
BasicTextandTextAutoSizewhere usingTextOverflow.Ellipsizewould result in smaller-than-optimal text. (I1e1d8, b/396582066) - Fixed a bug in
BasicTextFieldthat caused miscellaneous crashes whenTextFieldDecoratorskips callinginnerTextField. (I2638c), b/308398612 - Fixed a bug in
TextFieldthat caused the text toolbar and selection handles to completely disappear when theTextFieldStateinstance was changed. (I8068a), b/390477786 - Fixed a bug in
BasicTextwhere changing the min width constraint did not update the text’s placement whentextAlignwas set to a non-default value. (I77a96), b/406305552
Compose Foundation: v1.9.0-alpha02
May 7, 2025
androidx.compose.foundation:foundation-*:1.9.0-alpha02 is released. Version 1.9.0-alpha02 contains these commits.
API Changes
- Fixed how pointer input changes are added to the
VelocityTrackerinDragGestureNode, this can be controlled with the new flagisOffsetPositionBeforeAddingToVelocityTrackerEnabled. (Ic7992, b/292556787, b/236451818) - Make
await[Vertical/Horizontal]PointerSlopOrCancellationpublic (I6968b, b/298903681) AbstractComposeView.consumeWindowInsetsnow defaults to false.WindowInsetswill automatically be adjusted for child size and position when set to false, so there is no need to default it to true any longer. This fixes the issue where child Views were not receivingWindowInsetsupdates by default. Developers can opt out of the update either by changing the experimentalComposeFoundationLayout.isWindowInsetsDefaultPassThroughEnabledto true or, preferably, by settingAbstractComposeView.consumeWindowInsetsto true on all Compose view instances. (I6fa0a, b/411868840)
Compose Material: v1.8.1
May 7, 2025
androidx.compose.material:material-*:1.8.1 is released. Version 1.8.1 contains these commits.
Compose Material: v1.9.0-alpha02
May 7, 2025
androidx.compose.material:material-*:1.9.0-alpha02 is released. Version 1.9.0-alpha02 contains these commits.
Compose Material3: v1.4.0-alpha14
May 7, 2025
androidx.compose.material3:material3-*:1.4.0-alpha14 is released. Version 1.4.0-alpha14 contains these commits.
API Changes
- Added a new
AppBarColumncomposable working in the same fashion asAppBarRowbut for content laid out in a column. (Iaf6bd) - Added max items to
AppBarRow, this is necessary to correctly implement the material spec for top app bars. (I92ce4) - Added a method in
TooltipScopeto obtain thelayoutCoordinatesof the anchor. Deprecating thedrawCaretmethod because developers can use this new method to obtain the anchor boundslayoutCoordinatesand create an appropriate shape that contains a caret. (Ia2e12, b/329470609) - Added
java.timesupport for Date Pickers: IntroducedrememberDatePickerState/rememberDateRangePickerStateoverloads that accept java.time objects (e.g., initialLocalDate,YearMonth). Also added extension functions on the state objects to get/set values using types likeLocalDateandYearMonth. Requires API 26+ or desugaring. (I70f29, b/266202516, b/281859606) - Add
CenteredTrackcomposable allowing using a Slider with a track that starts from the center. (I5b1d6)
Bug Fixes
- Enhanced the performance of Wavy Progress Indicators: Linear types now load ~8.5% faster with ~11% fewer allocations, while Circular types see a substantial ~47% speed boost and ~39% reduced allocations. (I595d8)
Compose Material3 Adaptive: v1.2.0-alpha05
May 7, 2025
androidx.compose.material3.adaptive:adaptive-*:1.2.0-alpha05 is released. Version 1.2.0-alpha05 contains these commits.
New Features
- Material3 adaptive layouts are now supporting Levitated adapt strategies that can turn a pane into a floating popup.
API Changes
- Make current window size functions support multi-platform (Ie4172)
- Introduce pane motions for levitated panes (Ic9dc3)
- Introduce levitate strategy for adaptation (I1ba7c)
Bug Fixes
- Fix the usage of coroutine scope in adaptive samples (7631016)
Compose Runtime: v1.8.1
May 7, 2025
androidx.compose.runtime:runtime-*:1.8.1 is released. Version 1.8.1 contains these commits.
Compose Runtime: v1.9.0-alpha02
May 7, 2025
androidx.compose.runtime:runtime-*:1.9.0-alpha02 is released. Version 1.9.0-alpha02 contains these commits.
API Changes
- Deprecated
rememberSaveablewith a custom 'key'. It bypasses positional scoping, leading to state bugs and inconsistent behavior (e.g., unintentional state sharing or loss, issues in nestedLazyLayouts). Please remove the 'key' parameter to use positional scoping for consistent, locally-scoped state. See the full commit message for more details. (I5e6ff, b/357685851)
Bug Fixes
OffsetAppliernow correctly overridesapply()which was introduced with pausable composition. Not having this could cause pausable composition to throw throw an exception when updating virtual nodes. (Idbf31, b/409291131)- Fixed a deadlock that may affect Molecule users when a suspended call to
FrameClock.withFrameNanosis cancelled while a frame is being dispatched. (I89cab, b/407027032) - The Recomposer could go idle with movable content state still pending to be discarded. This normally does not occur as movable content state is discarded in the main loop of the Recomposer. However, this can occur in pausable composition when the movable content is discarded during
resume()(Ie5416, b/409267170) - The order in which
onReuseandonDeactivatecould get inverted during pausable composition. They are now guaranteed to occur in order ofonDeactivate/onReuse. (I996e4, b/404058957)
Compose UI: v1.8.1
May 7, 2025
androidx.compose.ui:ui-*:1.8.1 is released. Version 1.8.1 contains these commits.
Bug Fixes
- Fix some issues with
onLayoutRectChangedandLazyLayoutd791b11 - Skip remeasure requests for precomposed items. This bug affected the lazy layouts scrolling performance as the prefetch was not working efficiently in some cases, the measurement was happening within the frame. 742087a
Compose UI: v1.9.0-alpha02
May 7, 2025
androidx.compose.ui:ui-*:1.9.0-alpha02 is released. Version 1.9.0-alpha02 contains these commits.
API Changes
- Add in
dialogContentTitletoDialogProperties, which sets the content window title. bf9d670
Bug Fixes
- Window Insets Rulers have been disabled temporarily while internal tests are fixed. 8d1402
- Fixed how pointer input changes are added to the
VelocityTrackerinDragGestureNode, this can be controlled with the new flagisAdjustPointerInputChangeOffsetForVelocityTrackerEnabled.254ddb
Core-telecom: v1.0.0
May 7, 2025
androidx.core:core-telecom:1.0.0 is released. Version 1.0.0 contains these commits.
Major features of 1.0.0
- Initial stable release of core-telecom API, focusing on
CallsManagerAPI surface for integration of VoIP calls into the Android platform.
credentials: v1.6.0-alpha01
May 7, 2025
androidx.credentials:credentials:1.6.0-alpha01 and androidx.credentials:credentials-play-services-auth:1.6.0-alpha01 are released. Version 1.6.0-alpha01 contains these commits.
New Features
- Passkey conditional create - Enables the passkey conditional create feature, whereby developers can request for a conditional passkey creation. A conditional creation request will be propagated to the preferred credential provider and then based on some internal conditions, a passkey will be created without the typical bottom sheet UI experience. Users will see a notification with information about the passkey that was just created.
API Changes
- Expose
CreateCredentialResponse.createFromAPI (Ic0494) - Exposed
isConditionalCreatebit to allow silent passkey creation. (I3a1bb)
credentials providerevents: v1.0.0-alpha01
May 7, 2025
androidx.credentials.providerevents:providerevents:1.0.0-alpha01 and androidx.credentials.providerevents:providerevents-play-services:1.0.0-alpha01 are released. Version 1.0.0-alpha01 contains these commits.
New Features
- A new
CredentialProviderEventsServiceis being added that credential providers will support to receive events from Credential Manager APIs. One of the features that credential providers can now support through this service is the passkey conditional create experience. This service is designed to propagate other credential provider updates as well in the future.
API Changes
CredentialProviderEventsService- a new service for credential providers to extend from in order to receive events from Credential manager API.
DataStore: v1.1.6
May 7, 2025
androidx.datastore:datastore-*:1.1.6 is released. Version 1.1.6 contains these commits.
Bug Fixes
- Resolved an issue where Gradle metadata was broken in version
1.1.5. This issue was caused by a bug in the new AGP KMP plugin DSL preventing metadata for all target platforms from being automatically included. The bug leads to some DataStore Android methods no longer visible in clients’ builds. The fix involves using the olderandroidDSL inbuild.gradleinstead ofandroidLibrary. (7801abf)
DataStore: v1.2.0-alpha02
May 7, 2025
androidx.datastore:datastore-*:1.2.0-alpha02 is released. Version 1.2.0-alpha02 contains these commits.
API Changes
- Added multiprocess support in
GuavaDataStore. (e0d608a). - Added a helper method to create a
GuavaDataStorefrom aDataStore. (9af26f4) - Projects released with Kotlin 2.0 require KGP 2.0.0 or newer to be consumed. (Idb6b5)
- Replace the existing
datastoreoverload with a delegate method to initialize a DataStore to be used during direct boot. (If71b9)
Documentfile: v1.1.0
May 7, 2025
androidx.documentfile:documentfile:1.1.0 is released. Version 1.1.0 contains these commits.
Glance: v1.2.0-alpha01
May 7, 2025
androidx.glance:glance-*:1.2.0-alpha01 is released. Version 1.2.0-alpha01 contains these commits.
API Changes
currentCompositeKeyHashis now deprecated. UsecurrentCompositeKeyHashCodeinstead. The replacement API encodes the same hash with more bits, which exponentially reduces the chance of two random unrelated groups in the composition hierarchy from having the same hash key.(I4cb6a, b/177562901)- Adds a new api to specify alpha (
0fto1f) for the glance Image composable and the background image modifier. When not specified, retains the alpha from the source image. (I8ad05) - Add Glance APIs for generated previews. Override
GlanceAppWidget.providePreviewto provide a preview layout for your widget. Then, callGlanceAppWidgetManager.setWidgetPreviewto set your preview. (Iced16) - Add
MultiProcessGlanceAppWidgetto support multiprocess configurations (Idbb90) - Removes experimental tag, we now support lambdas (I74d98, b/299361317)
- Allow specifying the lambda receiver for
GlanceAppWidget.runComposition(I84829) - Add
previewSizeparameter torequestPinGlanceAppWidget(I9f8f0, b/303256067)
Bug Fixes
- Removed manual outlining of access to new platform APIs since this happens automatically via API modeling when using R8 with AGP 7.3 or later (e.g. R8 version 3.3) and for all builds when using AGP 8.1 or later (e.g. D8 version 8.1). Clients who are not using AGP are advised to update to D8 version 8.1 or later. See this article for more details. (If6b4c, b/345472586)
- Update
glance-appwidgetlibraries tocompileSdk 35(I2e26b)
Health Services Client: v1.0.0
May 7, 2025
androidx.health:health-services-client:1.0.0 is released. Version 1.0.0 contains these commits.
Major features of 1.0.0
- This is the promotion of 1.0.0-rc02 to be the stable release of Health Services Client. There are no changes from 1.0.0-rc02.
Hilt: v1.3.0-alpha01
May 7, 2025
androidx.hilt:hilt-*:1.3.0-alpha01 is released. Version 1.3.0-alpha01 contains these commits.
API Changes
- Updates the library and annotation processor to target Kotlin 2.0 to support newer Kotlin toolchain including KSP2.
Lifecycle: v2.9.0
May 7, 2025
androidx.lifecycle:lifecycle-*:2.9.0 is released. Version 2.9.0 contains these commits.
Important changes since 2.8.0
- A new
androidx.lifecycle:lifecycle-viewmodel-testingKMP artifact is available that provides aViewModelScenarioclass for testingViewModelsin isolation, with support foronClearedandSavedStateHandleas well as testing process death and recreation viarecreate(). - Add
getMutableStateFlowtoSavedStateHandleto return aMutableStateFlow. This new function is key-exclusive and cannot be used withgetLiveData. An exception will be thrown if you try to use both to access the same state. CreationExtrasnow includes map-like operator overloads to enable idiomatic manipulation of content in Kotlin. It allows the use ofin,+=, and+withCreationExtras.
KotlinX Serialization Support
-
With the support of KotlinX Serialization added in SavedState
1.3.0, we have introducedsaved, a lazy property delegate, to make it easy to store@Serializableclasses in aSavedStateHandleand have those classes automatically be restored across process death and recreation. Please note thesaveddelegate is lazy and will not call theinitlambda or save anything into theSavedStateHandleuntil it is accessed.@Serializable data class Person(val firstName: String, val lastName: String)class MyViewModel(handle: SavedStateHandle) : ViewModel() {
var person by handle.saved { Person("John", "Doe") }fun onPersonChanged(person: Person) {
this.person = person
}
}
Kotlin Multiplatform
- The
lifecycle-testingmodule is now KMP compatible including APIs likeTestLifecycleOwner. - The
lifecycle-viewmodel-savedstatemodule is now KMP compatible including APIs likeSavedStateHandle. - The
androidx.compose.ui.platform.LocalLifecycleOwneris now available in the common source set. NewInstanceFactoryis now available on JVM Desktop and Android targets.
Behavior Changes
- The
Lifecycle.DESTROYEDstate is terminal, and any attempt to move aLifecyclefrom it to any other state will now result in anIllegalStateException. SavedStateHandleno longer includes anySavedStateProvider.saveState()where the returnedBundleis empty.
Mediarouter: v1.8.0-beta01
May 7, 2025
androidx.mediarouter:mediarouter:1.8.0-beta01 and androidx.mediarouter:mediarouter-testing:1.8.0-beta01 are released. Version 1.8.0-beta01 contains these commits.
API Changes
- Include client package name in
RouteControllerOptions(Ieac03)
Bug Fixes
- Fix
NullPointerExceptionwhen attempting to detach a non-existent controller from a connection (8e61574).
Navigation: v2.9.0
May 7, 2025
androidx.navigation:navigation-*:2.9.0 is released. Version 2.9.0 contains these commits.
Important changes since 2.8.0
- Navigation Safe Args actions are now generated with the
@CheckResultannotation to ensure they are used.
SupportingPane Interface
- Custom Navigators can now mark their destinations as implementing the
SupportingPaneinterface which indicates to theNavControllerthat these destinations will be shown alongside other destinations. By using this interface, multiple destinations can beRESUMEDat the same time, for instance.
Compose Kotlin Multiplatform
- Navigation now offers a new common
NavController.handleDeepLink()function that takes aNavDeepLinkRequestinstead of anIntent. This allows platforms other than Android to properly handle deep links. Thanks Konstantin Tskhovrebov! - Navigation now offers
NavUri, a new common parser function that is a compatible API for Android’s URI on other platforms. This makes it possible to create a URI in a platform agnostic way. Thanks Konstantin Tskhovrebov!
Type Safe functions
- The type safe APIs that were previously only accessible via
reifiedmethods i.e.,composable<YourScreen>now have non-reified versions that directly take aKClassinstance. - Navigation type safety now supports value classes as a route or as the argument type of a route.
pdf: v1.0.0-alpha09
May 7, 2025
androidx.pdf:pdf-*:1.0.0-alpha09 is released. Version 1.0.0-alpha09 contains these commits.
Major Changes
- The codebase has undergone a major refactoring and is now fully written in Kotlin, utilizing Coroutines and
ViewModel. This includes a reimplementation of thePdfViewerFragment. This release does not include any new APIs or features.
Known Issues:
- The fast scroller and page indicator are missing shadow effects.
- Single-page PDF documents might not always be centered and scaled to the view's width.
API Changes
- Annotate
containerStyleResIdwith@StyleRes. (I88d85)
RecyclerView-Selection: v1.2.0-rc01
May 7, 2025
androidx.recyclerview:recyclerview-selection:1.2.0-rc01 is released. Version 1.2.0-rc01 contains these commits.
Bug Fixes
- Fix small mouse moves turning clicks into drags. (Ie9106)
Savedstate: v1.3.0
May 7, 2025
androidx.savedstate:savedstate-*:1.3.0 is released. Version 1.3.0 contains these commits.
Important changes since 1.2.0
LocalSavedStateRegistryOwnerhas been moved from Compose UI to the newsavedstate-composemodule so that its Compose-based helper APIs can be used outside of Compose UI. This should always be used when using Compose UI1.9.0-alpha02and higher, but is backward compatible such that it can be used with all versions of Compose.- The
savedstate-ktxkotlin extensions have now been moved to the base savedstate module. SavedStateRegistryOwnerinstances retrieved viafindViewTreeSavedStateRegistryOwnercan now be resolved through disjoint parents of a view, such as aViewOverlay. See the release notes of core or the documentation inViewTree.setViewTreeDisjointParentfor more information on disjoint view parents.
Kotlin Multiplatform
- The
SavedStatemodule is now KMP compatible. Supported platforms now include Android, iOS, Linux, Mac, and JVM desktop environments. -
Introduce
SavedStateopaque type as an abstraction to provide a consistent way to save and restore application state in KMP. It includes aSavedStateReaderandSavedStateWriterfor modifying the state to be saved. On Android,SavedStateis a type alias forBundle, ensuring binary compatibility and facilitating the migration of existing APIs to a common source set. On other platforms,SavedStateis aMap<String, Any>instance.// Create a new SavedState object using the savedState DSL: val savedState = savedState { putInt("currentPage", 1) putString("filter", "favorites") }// Read from a SavedState object
val currentPage = savedState.read { getInt("currentPage") }// Edit an existing SavedState object
savedState.write {
remove("currentPage")
}
KotlinX Serialization Support
-
SavedStatenow includes KotlinX Serialization support. You can convert a class annotated with@Serializableto aSavedStateusing the methodsencodeToSavedStateanddecodeFromSavedState. The returnedSavedStateis a regularBundleon Android and can be used by any API that accepts aBundle.@Serializable data class Person(val firstName: String, val lastName: String)fun main() {
val person = Person("John", "Doe")
val encoded: SavedState = encodeToSavedState(person)
val decoded: Person = decodeFromSavedState(encoded)
}
-
While most types (such as primitive types) are directly supported without any configuration needed, additional serializers that can be used with
@Serializable(with = ___:class)can be found in theandroidx.savedstate.serialization.serializerspackage in thesavedstatemodule and theandroidx.savedstate.compose.serialization.serializerspackage in thesavedstate-composemodule. -
We also have included
saved, a lazy property delegate, to make it easy to store@Serializableclasses in aSavedStateRegistryOwner(e.g.,ComponentActivity,Fragment, etc.) and have those classes automatically be restored across process death and recreation. Please note thesaveddelegate is lazy and will not call theinitlambda or save anything into theSavedStateRegistryuntil it is accessed.@Serializable data class Person(val firstName: String, val lastName: String)class MyActivity : ComponentActivity() {
var person by saved { Person("John", "Doe") }override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
this.person = Person("Jane", "Doe")
}
}
-
There is a similar
savedproperty delegate forSavedStateHandleadded in Lifecycle2.9.0.
Sqlite: v2.5.1
May 7, 2025
androidx.sqlite:sqlite-*:2.5.1 is released. Version 2.5.1 contains these commits.
API Changes
- Allow
androidx.sqlite:sqlite-bundledto load its native component from a specified path via the system property namedandroidx.sqlite.driver.bundled.path. b/381282544
Test Uiautomator: v2.4.0-alpha02
May 7, 2025
androidx.test.uiautomator:uiautomator:2.4.0-alpha02 is released. Version 2.4.0-alpha02 contains these commits.
New Features
- Initial shape of new
UiautomatorApi.UiAutomatorTestScopecan be created through the factoryuiAutomatorthat gives access to the newonViewapis. - Initial Lint Rules for warning about usage of
AccessibilityNodeInfo#getTextand suggest usage oftextAsString.
API Changes
- Added
Configurator#setDefaultDisplayIdto set a display ID to restrict all searches to (Icdf17). - Changed
Searchable(interface shared byUiDeviceandUiObject2) to public for convenience (I67f18).
Bug Fixes
- Fixed handling of meta keys in
UiDevice#pressKeyCodes. (I73f80). - Updated
UiDevice#getWindowRootsto always return roots in Z order (I87426). - Fixed issue where certain gestures were incomplete (I60dd3, If4edd).
- Fixed rare infinite loop when calling
UiDevice#scrollUntil(I39989).
TV Provider: v1.1.0
May 7, 2025
androidx.tvprovider:tvprovider:1.1.0 is released. Version 1.1.0 contains these commits.
Wear Compose: v1.5.0-beta01
May 7, 2025
androidx.wear.compose:compose-*:1.5.0-beta01 is released. Version 1.5.0-beta01 contains these commits.
The 1.5.0-beta01 release of Compose for Wear OS indicates that this release of the library is feature complete and the API is locked (except where marked as experimental).
Wear Compose 1.5.0-beta01 includes the Wear Compose Material3 library, which supports the new UI design system called Material 3 Expressive. It is recommended to upgrade from Material to Material3 to embrace the new visual design in apps, and to benefit from the new components as follows:
MaterialThemefor updated and extended color schemes, typography, and shapes to bring both depth and variety to your designs.- Dynamic Color Theming which automatically generates a color scheme for your app to match the watch face colors.
- New components automatically adapt to larger screen sizes by default
- Shape Morphing - round button components like
IconButton,TextButton,IconToggleButtonandTextToggleButtonsupport variations that animate when pressed or checked. EdgeButton- a new edge-hugging button with a special shape designed for the bottom of the screen.- Scaffolds - introducing
AppScaffoldandScreenScaffoldto lay out the structure of the screen and coordinateScrollIndicatorandTimeTextanimations. - Buttons - numerous stadium-shaped buttons are supported with flexible, single-slot containers and multi-slot variations for buttons with icons and labels.
CheckboxButtonandSwitchButtonare provided when toggle buttons are needed, whilstRadioButtonis the available selection button (‘Split’ variations of the toggle and selection buttons are also provided). ButtonGroup- implements an expressive group of buttons in a row that shape-morph when touched.AlertDialogvariations support ok/cancel buttons or anEdgeButton.ConfirmationDialogis available to display a message with a timeout, supporting special animations for success, failure and open-on-phone variations.- Pickers -
TimePickerandDatePickervariations are supported as well as the Picker andPickerGroupcomponents for building your own picker screens. ProgressIndicators- circular, and linear progress indicators are supported (theCircularProgressIndicatorhas segmented and indeterminate variations).- Cards - a number of card variations are available, including
TitleCardwhich offers specific layouts for cards with title, time, subtitle or content slots.TitleCardcan also be given an image background to reinforce the meaning of the information in a card. - Pagers -
HorizontalPagerScaffold,VerticalPagerScaffoldandAnimatedPagecomponents coordinateHorizontalPageIndicatorandVerticalPagerIndicatoranimations.HorizontalPagerandVerticalPagerare released in the Wear Compose Foundation library. - Placeholders - draws a skeleton shape over a component, for situations where no provisional content is available.
- Sliders and Steppers - both sliders and steppers allow users to make a selection from a range of values. Sliders are more compact and can be segmented, whereas Stepper is a full screen component typically paired with a
StepperLevelIndicator. SwipeToReveal- used to add additional actions to a composable when it is swiped right-to-left.
In addition, Wear Compose Foundation 1.5.0-beta01 includes these new components:
TransformingLazyColumn- a lazy, vertically scrolling list the supports scaling and morphing animations- Hierarchical Focus Groups - used to annotate composables in an application, to keep track of the active part of the composition and coordinate focus.
- Pagers -
HorizontalPagerandVerticalPagercomponents, built on the Compose Foundation components with Wear-specific enhancements to improve performance and adherence to Wear OS guidelines.
API Changes
- Updated the Hierarchical Focus API - renamed
Modifier.hierarchicalFocustoModifier.hierarchicalFocusGroupand removed the callback parameter; removed the overload ofModifier.hierarchicalFocusRequesterwith aFocusRequesterparameter; created a newCompositionLocal,LocalScreenIsActiveso that components can inform and check which screen is the active one. (I5ff7c). - Deprecated
SwipeToRevealfrom Wear Compose Foundation in favor ofSwipeToRevealAPIs in Wear Compose Material and Wear Compose Material3. Please replace Wear FoundationSwipeToRevealimports with Wear Compose Material/ Wear Compose Material3 imports to continue using the APIs. (Ia147d). - Wear Compose Material3
SwipeToRevealdependencies on Foundation were moved to the material3 package, e.g.RevealValue,RevealDirection,RevealActionType,RevealState,rememberRevealState. Developers should change their imports of these classes and functions fromandroidx.wear.compose.foundationtoandroidx.wear.compose.material3. (I640e6). - Updated the Wear Compose Material3
SwipeToRevealAPI as follows: addedprimaryAction,onFullSwipe,secondaryAction,undoPrimaryAction,undoSecondaryActionandhasPartiallyRevealedStateparameters to theSwipeToRevealcomposable; removed the ability to customizepositionalThresholdandanimationSpecfromRevealState; removedlastActionType,revealThresholdand width fromRevealState; changed theRevealStateconstructor to accept aRevealDirectioninstead of anchors; removedcreateRevealAnchors, anchors, andbidirectionalAnchorsfunctions;SwipeToRevealScopefunctionsprimaryAction,secondaryAction,undoPrimaryActionandundoSecondaryActionwere renamed toPrimaryActionButton,SecondaryActionButton,UndoActionButtonand made into Composable functions; markedRevealActionTypeas internal. (I885d0). - Further updated
SwipeToRevealAPI as follows: renamedonFullSwipetoonSwipePrimaryAction; renamedSwipeToRevealNonAnchoredSampleto indicate the use of thehasPartiallyRevealedStateparameter; removedactionButtonHeight, since the default is the Button's default height and the larger height can be set using a modifier; removed theSmallActionButtonHeightfromSwipeToRevealDefaults; made the value parameter inRevealValueandRevealDirectionconstructors private. (I465ce).
Bug Fixes
- Fixed
ScreenScaffold’sEdgeButtonhandling so that, after aTransformingLazyColumnitem is removed, theEdgeButtonis animated into place. (I6d366). - Updated Wear Compose dependencies on Compose libraries to version 1.8.0. (I2ef3f).
- Updated the motion of the indeterminate
CircularProgressIndicatorso that it no longer regresses temporarily. (Ieddb1). - Fixed a
SwipeDismissableNavHostbug - the focus was not switching correctly after swiping back, causing rotary input to fail (this was for API 36+, which uses predictive back). (Ieddb1). - Amended documentation for the Hierarchical Focus API (Idf2ff).
- Updated the documentation for Button and Card to state how
containerPainteranddisabledContainerPainteroverridecontainerColoranddisabledContainerColor(I4a453). - Reverted a change to
TimeTextin the previous release which moved theBroadcastReceiverto a worker thread, because it caused issues for apps that manage their own threading during navigation. (I34d02). - Updated the Picker samples to remove unnecessary remember calls and instead use
rememberUpdatedStatein Picker to remember the latestcontentDescriptionlambda function. (Icb5b1). - Updated text styles in
TimePickerandDatePickerso that font changes no longer result in truncation. (I26194). ListHeaderandListSubHeadernow default text alignment to center-aligned and start-aligned respectively. (I78339).- Updated Foundation and Material Swipe to Reveal samples and demos to announce custom accessibility actions (the custom actions must be added as semantics on the content, not on the
SwipeToRevealcomposable itself). (Ie92a3). - Updated the default
MaxLinesset on theEdgeButtoncontent according to its size - it is now 1 for extra small, 2 for small and medium, and 3 for large. (Ie35f6). - Simplified
LocalReduceMotionso that the observer is only registered once, to improve performance. (Ib1979). - Minimized the number of redraws in
ScrollIndicator, to improve performance. (Ia7a67). - Fixed a bug in
TransformingLazyColumn, where the top visible item in the list did not scale correctly when EdgeButton achieved its full height. (I30580).
wear protolayout: v1.3.0-beta02
May 7, 2025
androidx.wear.protolayout:protolayout-*:1.3.0-beta02 is released. Version 1.3.0-beta02 contains these commits.
Bug Fixes
- We have made an important improvement in the Typography design values that are applied on API 36 and above. This is because from API 36, all Tiles will be in the system font, so this change introduces better consistency in the Tiles carousel. (If316f)
Text,Spacer,ArcLineandDashedArcLinebuilders won’t throw iflayoutConstraintsfor dynamic values are not set. Note that older renderers still require thelayoutConstraintsto be set and will ignore any dynamic value that doesn’t have it set. (Ic52e8)- Add heading semantics modifier to indicate that a layout element is heading for a section of content for accessibility purpose, and mark the text in the title slot of
primaryLayoutto be accessibility heading by default. (Iae1fb) - Final UX polish of the
primaryLayoutwhere space between title slot and main slot is decreased to 4dp instead of 6dp on smaller screens. (I0e056) - Apply default content description to
textEdgeButton. (Ifaf8b) - Minor update to the
avatarButtoninner padding. (I0910b)
Wear Tiles: v1.5.0-beta02
May 7, 2025
androidx.wear.tiles:tiles-*:1.5.0-beta02 is released. Version 1.5.0-beta02 contains these commits.
Webkit: v1.14.0-beta01
May 7, 2025
androidx.webkit:webkit:1.14.0-beta01 is released. Version 1.14.0-beta01 contains these commits.
API Changes
- Add context as parameter to
startUpWebView()API (Ic29cd, b/406701301)
WindowManager: v1.5.0-alpha02
May 7, 2025
androidx.window:window-*:1.5.0-alpha02 is released. Version 1.5.0-alpha02 contains these commits.
API Changes
- Add
WindowSizeClassbreakpoints for Large and XLarge. (I40d85) - Expand calculating
WindowMetricsto Application Context. (I8eeeb, b/360934048) - Provider a Getter to enable direct access to
WindowLayoutInfo(Ie9513) - Introduce API to auto save embedding state and to auto restore the embedding state when the app process is restarted. (Ie0295)
- Remove experimental
WindowInsetsAPI. (I68a71) - Hide a few constructors (I87b8d)
Bug Fixes
- Fixes
EmbeddingRulereturning differenthashCodein some cases. (I748cc)
ARCore for Jetpack XR: v1.0.0-alpha04
May 7, 2025
androidx.xr.arcore:arcore:1.0.0-alpha04 is released. Version 1.0.0-alpha04 contains these commits.
API Changes
- Projects released with Kotlin 2.0 require KGP 2.0.0 or newer to be consumed. (Idb6b5)
TrackingStateandHandJointTypehave been moved from ARCore to Runtime.Hand.State.isActive (boolean)has been changed toHand.State.trackingState (androidx.xr.runtime.TrackingState).Anchor.loadreturnsAnchor.AnchorLoadInvalidUuidif the UUID is invalid.
Jetpack Compose for XR: v1.0.0-alpha04
May 7, 2025
androidx.xr.compose:compose:1.0.0-alpha04 and androidx.xr.compose:compose-testing:1.0.0-alpha04 are released. Version 1.0.0-alpha04 contains these commits.
New Features
- Added
CompositionLocalConsumerSubspaceModifierNodeinterface to allow customSubspaceModifiertypes to access composition local values. - Added a new
SpatialPanelAPI that follows the composeAndroidViewimplementation style and deprecates the previousViewBased SpatialPanel. - Added
VolumeConstraints.Unboundedcompanion object which represents unbounded constraints. - Added
SubspaceModifier.onPointSourceParamsto allow a spatialized audio source. - A public
ApplicationSubspacehas been added, offering optionalVolumeConstraintsto define a 3D area where the app can render spatial content. By default, if no constraints are specified, the Subspace will be bounded by theSpatialUser's current field of view in width and height. Users can provide constraints to be used if the field of view cannot be determined. Otherwise, the default field of view width and height values are used. - Added
SpatialExternalSurface, which can be used to render stereoscopic content.SpatialExternalSurfaceis customizable with modifiers (except alpha), and an edge feathering effect. - Added a new
pointerHoverIconSubspace Modifier that allows users to set the icon for the spatial pointer.
API Changes
- Removed
RequiresApi(34)restriction on all Jetpack XR packages. This restriction was redundant as Jetpack XR is currently only available on devices with API level 34+. (Iae0f8) - Projects released with Kotlin 2.0 require KGP 2.0.0 or newer to be consumed. (Idb6b5)
- Back handling will now work on spatial panels without embedded activities. For back handling to work you need to specify
android:enableOnBackInvokedCallback="true"in the android manifest. - Backhandling will now work on spatial dialogs. For backhandling to work you need to specify
android:enableOnBackInvokedCallback="true"in the android manifest. - Compose-based and View-based
SpatialPanels can now size themselves based on their contents. - Developers may now set their own custom
SpatialElevationLevelvalues and are not limited to the predefined levels. - Orbiter elevation level may now be customized via the
elevationparameter. - Subspace can now be bounded by the
SpatialUser's field of view in width and height by default. If the field of view cannot be determined, the default field of view width and height values are used. - Added new callbacks
onMoveStartandonMoveEndto theMovablemodifier. TheonMoveStartandonMoveEndcallbacks are called when the user starts and ends moving a subspace composable with the movable modifier. - The
nameparameter has been removed from spatial APIs such asSpatialRowandSpatialPanel. For debugging spatial compose trees useSubspaceModifier.testTaginstead. - Removed an unsupported overload of
SpatialPopupthat only hasspatialElevationLevelandcontent. Please use the interface that supportsonDimissRequest. - The
onPoseChangecallback from the Movable modifier has been removed. UseonMoveinstead. SubspaceModifierswill no longer apply their effects if they are detached or currently detaching.- The existing
SpatialRowAPI has been split intoSpatialRowandSpatialCurvedRow. If previously usingSpatialRow'scurveRadiusparameter, useSpatialCurvedRownow instead which offers the same behavior. MainPanelandActivityPanelno longer have title bars when run on a similarly recent system image.- Alpha and scale modifiers are now stackable and will multiply their values for the final applied alpha or scale value.
- The
onPoseChangecallback from the Movable modifier has been optimized to perform smoother pose movement. - The movable and resizable modifiers will now perform their callbacks on the main thread to ensure that state changes will trigger recomposition.
- Added state observation to the layout and measure phases to ensure that state changes in
SubspaceLayoutwill trigger relayout. - Optimized modifier chain updates to better reuse existing modifiers.
Bug Fixes
- Stopped scrimming when a
SpatialDialogis shown. (Ic4594) - Relayout requests made while modifier nodes are detached will now be ignored.
- Removed relayout phases triggered by Movable and Resizable modifiers.
- Fixed a crash in
MainPanel()composable that occurred when either dimension was set to zero, either directly or during a layout calculation, e.g., aSpatialRow/SpatialColumncalculation. The panel will now be hidden instead. Note that this fix specifically addresses crashes during the layout phase; resizing the panel to zero via user interaction will be handled separately. The hidden panel lacks UI affordances. - Fixed issue with
maintainAspectRatiofrom the resizable modifier. The aspect ratio should be kept now. - Fixed an issue with nested Subspaces where they would be incorrectly positioned for a single frame.
- Fixed issue where rounded corners were sometimes not applied when they should be.
NestedSubspaceswill no longer appear for one frame in the wrong location.
Material Design for XR: v1.0.0-alpha07
May 7, 2025
androidx.xr.compose.material3:material3:1.0.0-alpha07 is released. Version 1.0.0-alpha07 contains these commits.
API Changes
- Projects released with Kotlin 2.0 require KGP 2.0.0 or newer to be consumed. (Idb6b5)
XR Runtime: v1.0.0-alpha04
May 7, 2025
androidx.xr.runtime:runtime:1.0.0-alpha04, androidx.xr.runtime:runtime-openxr:1.0.0-alpha04, and androidx.xr.runtime:runtime-testing:1.0.0-alpha04 are released. Version 1.0.0-alpha04 contains these commits.
New Features
- Session now implements
androidx.lifecycle.LifecycleOwnerfor more interoperability with existing Android lifecycle paradigms. - Manifest strings for Android XR are specified and documented here.
- Spatial Visibility Callback extension methods added to monitor when the scene content moves inside or outside the user's field of view.
- Added a stub version of the
JxrPlatformAdapter(and all its related classes). - Session will be used in both
SceneCoreand Runtime instead of the Session inSceneCore. ActivityPose.hitTestwas added, enabling ahitTestagainst virtual content.- Specifying multiple Runtime implementations at compile time is now supported. Only one will be loaded at execution time based on the current device's feature set.
- Added new Component type
SpatialPointerComponent, allowing clients to specify the icon rendered for the pointer, or to disable the icon. This Component can currently be attached toPanelEntityinstances only.
API Changes
- Make Config implementation public. (I95860)
- Add
HandJointTypeandTrackingState. (I55880) - Projects released with Kotlin 2.0 require KGP 2.0.0 or newer to be consumed (Idb6b5)
Hand.isActive (boolean)has been changed toHand.trackingState. TheOpenXRimplementation has been modified accordingly.android.permission.SCENE_UNDERSTANDINGpermission requirement inSession.configurehas been changed toandroid.permission.SCENE_UNDERSTANDING_COARSE.LifecycleManager.configureis implemented and now passes in aConfigobject which contains a property for each configurable runtime feature.Session.configurecan now be called with aConfigin order to configure the available runtime features.Session.createnow supports passing aCoroutineContextinstead of aCoroutineDispatcher.Session.createsupports loadingARCorefor Jetpack XR and/orSceneCore. At least one must be provided (testing versions are available).FakePerceptionManagerthrows anAnchorInvalidUuidExceptionwhen an invalid UUID is passed toAnchor.loadandAnchor.unpersist.CoreStateis no longer a data class.
Bug Fixes
- Fixed Runtime proguard configurations.
Jetpack SceneCore: v1.0.0-alpha04
May 7, 2025
androidx.xr.scenecore:scenecore:1.0.0-alpha04 and androidx.xr.scenecore:scenecore-testing:1.0.0-alpha04 are released. Version 1.0.0-alpha04 contains these commits.
New Features
- Backhandling will now work on panel entities without embedded activities. For backhandling to work you need to specify
android:enableOnBackInvokedCallback= "true"in the android manifest. StereoSurfaceEntitynow supports MV-HEVC playback through two newStereoModevalues: MULTIVIEW_LEFT_PRIMARY and MULTIVIEW_RIGHT_PRIMARY.PanelEntity.setSizeandPanelEntity.getSizenow return sizes in parent space.Entity.setPose,Entity.getPose,Entity.setScale,Entity.getScale,Entity.setAlphaandEntity.getAlphanow take a new paramrelativeTo, which allows get/set values relative to different spaces. The supported values are Parent, Activity and Real World spaces, and the default value for this param is Parent.- Spatial Visibility Callback extension methods added to
SessionExt.ktto monitor when the scene content moves inside or outside the user's field of view. setPointSourceParamshas been added toSpatialAudioTrack, allowing the params to be updated after the track has been built.- Added a new class, Scene, with references to
ScenecoreAPIs. Scene will be accessible as an extension property of Session. Functions inside ofSessionExthave been moved to Scene so imports will be need to be adjusted; for example,SessionExt.getScene(session).addSpatialCapababilitiesChangedListenerversusSessionExt.addSpatialCapabilitiesChangedListener. ActivityPose.hitTestAsyncwas added, enabling ahitTestagainst virtual content.- Added new Component type
SpatialPointerComponent, allowing clients to specify the icon rendered for the pointer, or to disable the icon. This Component can currently be attached toPanelEntityinstances only. - Introducing new
PanelEntityfactory, which takes panel dimensions in either meters or pixels. OlderPanelEntityfactory taking two Dimension type params for panel removed.
API Changes
- Removed
RequiresApi(34)restriction on all Jetpack XR packages. This restriction was redundant as Jetpack XR is currently only available on devices with API level 34+. (Iae0f8) - Projects released with Kotlin 2.0 require KGP 2.0.0 or newer to be consumed (Idb6b5)
PermissionHelperclass has been removed.PanelEntity.getPixelDensityis deprecated.PanelEntity.setPixelDimensionsandPanelEntity.getPixelDimensionare removed, replaced bysetSizeInPixelsandgetSizeInPixels.Entity.getActivitySpaceAlpharemoved. Can be replaced withEntity.getAlpha(Space.Activity).Entity.getWorldSpaceScaleremoved. Can be replaced withEntity.getScale(Space.REAL\_WORLD).- The Session class in
SceneCorehas been deleted in favor of the Session in XR Runtime. StereoSurfaceEntityhas been renamed toSurfaceEntity.Entity.setSizeandEntity.getSizeare removed, and the same methods were added toPanelEntity.PointSourceAttributeshas been renamed toPointSourceParams.SpatializerConstants.SOURCE\_TYPE\_BYPASShas been renamed toSpatializerConstants.SOURCE\_TYPE\_DEFAULT.PointSourceParamsentity has been modified from public to internal access.AnchorEntity.createnow requiresPlaneTrackingModeto be configured inSession.configure().SpatialUserAPIs now requireHeadTrackingModeto be configured inSession.configure().- When
ResizableComponentis not attached, it will give INFO-level log instead of ERROR-level log. - Fov class is now a regular Kotlin class.
- Split
Entity.ktto place each concrete entity type into its own file. - When creating a new
PanelEntity, most Views will be reparented to aFrameLayout. This facilitates the use ofLayoutInspectorwith Spatial Panels. - The currently used
XrExtensionsinstance is now registered with the platform, in a best effort way, to help with app debugging.
Bug Fixes
- A fix was added to prevent a crash that could occur when a
PanelEntitywithMovableComponentandAnchorPlacementwas moved - Fixed an issue where
ResizableComponentwas providing stale sizes inonResizeStartcallback. - Fixed crash when
JxrPlatformAdapterAxr'sdispose()was called multiple times.