July 1, 2026

API Changes

  • Added AppFunctionServiceEntryPoint. All AppFunction annotation must be declared within the AppFunctionService that is annotated with AppFunctionServiceEntryPoint Idc5d5 b/463909015
  • Moved AppFunction and AppFunctionConfiguration APIs . AppFunctionConfiguration will be removed in future release as it will be replaced by AppFunctionServiceEntryPoint Iaff23 I4cf3e b/517876475
  • Updated AppFunctionService API to support callback I6e0d7 b/519880977
  • Add searchAppFunctions API I8c0f9 I1fa27 b/494239238
  • Added functionNames to AppFunctionSearchSpec I95f53 b/494239238
  • Added AppFunctionInstruction annotation I21120 b/488994214
  • Added AppFunctionSignature annotation and accompanying constants to declare runtime registered app function signatures. I82a05 Ie2361 Ib6bb2

Bug Fixes

  • Omit enabledByDefault from generated XML for AppFunctionSignatures Ie2996 b/501032667

API Changes

  • Simplified Perfetto trace capture on device. I48810
  • Move the experimental TraceProcessor.runServer extension APIs from androidx.benchmark:benchmark-macro to androidx.benchmark:benchmark-common, and to the androidx.benchmark package. This will enable their use in microbenchmarks in the future. Ie25bb b/393640753

Bug Fixes

  • Update traceprocessor implementation (as well as unbundled Perfetto Trace capture) to use Perfetto v56.0 I8fb9d
  • Set androidx.benchmark.requireAot and androidx.benchmark.requireAot to true by default. These safer defaults ensure that compilation is performed ahead of running microbenchmarks (on by default with the benchmark gradle plugin when using AGP 8.4+), and that measureRepeated is not used on the main thread, where it can cause ANRs. I1bc3c b/379115078
  • Increased perfetto kill timeout from 5 to 30 seconds (for benchmark captured Perfetto sessions only). Added clearer error logging when the issue occurs. If188f b/435589290

API Changes

  • CameraXViewfinder now supports built-in gestures for pinch-to-zoom and tap-to-focus, and adds support for screen flash and stream state. FocusState is now public in viewfinder-core to allow monitoring tap-to-focus results. I66a17 b/522549890
  • Added TransformationMode property to TransformationInfo to support apps to use OpenGL pipeline in EMBEDDED mode. Id1de1 b/487826941

Bug Fixes

  • Remove requirement for compileSdk 37 If78b4

API Changes

  • CameraXViewfinder now supports built-in gestures for pinch-to-zoom and tap-to-focus, and adds support for screen flash and stream state. FocusState is now public in viewfinder-core to allow monitoring tap-to-focus results. I66a17 b/522549890
  • Added isAutoRotationEnabled to SessionConfig.Builder , HighSpeedVideoSessionConfig.Builder, ExtensionSessionConfig.Builder and introduced a Kotlin DSL factory functions for them. This allows setting the appropriate rotation automatically based on device sensors. I5b4a3 b/510752515
  • Added TransformationMode property to TransformationInfo to support apps to use OpenGL pipeline in EMBEDDED mode. Id1de1 b/487826941
  • Added isNightModeIndicatorSupported() and getNightModeIndicator() to CameraInfo to determine when the environment conditions meet the criteria for Night Mode. Iae47b b/499389465
  • Exposed ImageAnalysis.OUTPUT_IMAGE_FORMAT_PRIVATE and ImageProxy.getHardwareBuffer() as public API to support GPU based ImageAnalysis. I41cb3 b/496022391 b/492934501
  • ExtensionsManager#getExtensionEnabledCameraSelector is now deprecated. Please use the new ExtensionSessionConfig API for enabling extension modes. I2b336 b/473715607
  • Added support for visual styling of camera frames during concurrent camera composition. You can now customize:
  • Rounded Corners: Use setRoundedCornerRatio(float) to apply normalized rounding (0.0 to 1.0) to frame edges.
  • Borders: Use setBorderWidthRatio(float) and setBorderColor(int) to add a decorative frame with consistent thickness I18a07 b/366349205
  • Updated CompositionSettings to enforce non-negative z-order and added validation to ConcurrentCamera.setCompositionSettings to ensure it's called with the correct number of settings in a valid composition mode. If660d b/496951658
  • Added getNightModeIndicator() and isNightModeIndicatorAvailable() to CameraExtensionsInfo to allow applications to monitor whether the current environment is in a night mode condition when using camera extensions. I62bb4 b/499389465
  • Added support for QHD video quality in VideoCapture. I0ac20 b/501305592
  • Added Recorder.Builder.setTargetAudioChannelCount(int) and Recorder.getTargetAudioChannelCount() to allow developers to set an explicit audio channel count. I6bee0 b/441895100
  • Added Recorder.Builder.setTargetAudioEncodingBitRate(int) to allow setting a target audio encoding bitrate. I29062 b/241151504
  • Added the ConcurrentCamera.setCompositionSettings API to allow apps to update composition of the current camera dynamically after the lifecycle has been bound. Additionally, a new setZOrder API in CompositionSettings.Builder enables precise control over the rendering order of overlapping camera streams. I90528 b/473702287
  • Introduced APIs for granular control over encoding formats. Developers can now discover device-supported formats using Recorder.getSupportedVideoMimeTypes() and getSupportedAudioMimeTypes(), which are currently experimental. Preferred formats can be explicitly configured via Recorder.Builder.setVideoMimeType() and setAudioMimeType(). Additionally, Recorder.getVideoCapabilities(CameraInfo, String) allows querying camera-specific capabilities, such as supported qualities and dynamic ranges, for a chosen codec. I4620e b/491319384
  • Added CameraController.setAutoRotationEnabled(boolean) to allow disabling the automatic device rotation listener. Ia0c03 b/449573627
  • Added AE/AWB locking support in FocusMeteringAction via a new setLockingMode API. This also allows updating 3A regions without locking focus, enabling the camera to remain in continuous autofocus mode while updating the focus area. I6416f b/481624745

Bug Fixes

  • Remove requirement for compileSdk 37 If78b4
  • Fixed CameraXViewfinder transformation issues in EMBEDDED mode when OpenGL pipeline is enabled by CameraX for binding more UseCases or surface processing. I3e637 b/487826941
  • Updated tests and activities to use ExtensionSessionConfig instead of the deprecated getExtensionEnabledCameraSelector API. I765d8 b/473715607
  • Fixed a compilation error "Cannot access class 'ListenableFuture'". Ic8cba b/497571473
  • Updated Compose compileSdk to API 37. This means that a minimum AGP version of 9.2.0 is required when using Compose. Id45cd b/413674743

Features - expressive timepicker component Iaa45f - Added new non-interactive variants of standard list item and segmented list item which follow Material Expressive specifications. The non-expressive version has been deprecated. Ide4de b/491994186

Behavioral Change - Fix issue where minimum height of expressive list items did not change based on lines of content. The feature flag isExpressiveListItemHeightBasedOnTextLinesFixEnabled has been introduced to aid migration. Ibbb91 b/484693233

API Changes

  • Expressive list item APIs are no longer experimental. I2836a
  • Remove ComponentOverride APIs I820c4
  • Remove unused offset parameter from DropdownMenuPopup. Added the default menu properties into the menu defaults. Updated the naming for groups label from MenuDefaults.Label to MenuDefaults.DropdownMenuGroupLabel. Added disabledContainerColor into MenuDefaults.selectableItemColors and MenuDefaults.selectableItemVibrantColors. Added Modifier parameter to composable functions in MenuDefaults that return a layout. I3d2b1
  • Added a public flingAnimationSpec getter to TopAppBarDefaults to expose the default fling animation spec. Ic1daa
  • Graduate TopAppBar, MediumFlexibleTopAppBar,LargeTopAppBar,LargeFlexibleTopAppBar,TwoRowsTopAppBar,FlexibleBottomAppBar,FlexibleContentPadding,FlexibleBottomAppBarHeight,FlexibleHorizontalArrangement,FlexibleFixedHorizontalArrangement to non-experimental. These APIs and variables no longer require the @ExperimentalMaterial3ExpressiveApi opt-in. Ia4af6
  • Graduate ExpandedDockedSearchBarWithGap and ExpandedFullScreenContainedSearchBar to non-experimental Ie152d

Bug Fixes

  • Cleans up API information Ia8066
  • Fix Scaffold's keyboard navigation order. I77194 b/462577176
  • Remove requirement for compileSdk 37 If78b4
  • Add a11y support for ScrollField component. More specifically, ScrollField now implements selectable and animates to the selected item on click with selected/unselected announcements in Talkback. I7bdb7
  • Fix bug where there is extra bottom padding if the nav suite scaffold's content has ime padding set. I86d9d b/389467593

API Changes

  • BasicPictureInPicture and VideoPlaybackPictureInPicture classes now require an Executor in their constructors. A new commit() method has been introduced and must be called to apply parameter changes. Ib9150 b/493673311

Bug Fixes

API Changes

  • Add a maxLifecycle parameter to the AndroidFragment composable. This allows you to cap the lifecycle state of the embedded Fragment, giving you finer control over its behavior in complex UI setups like pagers or tabs. Ie99b5 b/526109804
  • Fragment library now supports system tracing of the lifecycle event via Jetpack Tracing. Ibc63b b/112161409

Bug Fixes

  • Modified handleDeepLink to ensure only recognized deep links are handled Id4fe3 b/509640056
  • Changed ComposableFragment to use the fully qualified name from the destination instead of a fragment argument to inflate composable functions. I65ded b/509640586
  • Fixed a crash in FragmentNavigator that caused legitimate Fragments to throw an IllegalArgumentException when operations are optimized out. I093b0 b/340202276
  • Fixed an error in Navigation with Fragments where setting the graph programmatically would fail to be restored properly. I41251 b/321147435

Bug Fixes

  • Fixed popped entry disappearing immediately when popping to an entry that has a nested metadata containing lambda values. Idb872 b/520494430

New API

  • Added a rememberResultEventBus api which returns a ResultEventBus that can be passed to rememberResultEventBusNavEntryDecorator. This allows hoisting a ResultEventBus outside the ResultEventBusNavEntryDecorator. Ia655b b/516995400

DeepLinkRequest

  • Added two KMP-compatible constructors - one that takes a DeepLinkUri and one that takes a raw string uri. I3c088 b/513200887 b/522194187
  • (Android only) Added a constructor that takes an Intent. Ia0498 b/513200887 b/522194187
  • All constructors have an additional extras field for a Map<String, Any> to attach additional request information. If81d5 b/513200887
  • A new requestExtras dsl is added as a type safe way to build a map of extras. The dsl provides a put function to store pairs of RequestExtrasKey to Any. The Map<String, Any>.get(key) extension function can be used to read from the map with a RequestExtrasKeyI5091c b/513200887
  • (Android only) Added an ActionExtrasKey and actionExtra function to create an extras map with ActionExtrasKey. (Id0c90, [b/513200887]
  • Added a MimeTypeExtrasKey and mimeTypeExtra function to create an extras map with MimeTypeExtrasKey. I85131 b/513200887

DeepLinkMatcher

  • Added DeepLinkMatcher.mimeTypeFilter and DeepLinkMatcher.actionFilter functions to create DeepLinkMatcher.Filters that filter DeepLinkRequest by mimeType or action (Android only). Both filters match by string equality and is case-insensitive. Ie7e67 b/513191950

API Changes

DeepLinkRequest

  • Remove fromAction factory function. To create a request associated with an Action, use the new DeepLinkRequest.extras field.Id0c90 b/513200887
  • Removed fromMimeType factory function. To create a request associated with a mimeType, use the new DeepLinkRequest.extras field. I85131 b/513200887
  • (Android-only) Removed fromIntent factory function. Replaced by a new constructor that takes an Intent and extras map. Ia0498 b/513200887 b/522194187
  • Removed factory functions fromUri and fromUriString. Replaced by new constructors that either take a DeepLinkUri or a raw string uri. Id5b6f b/522194187
  • DeepLinkMatcher, DeepLinkMatcher.MatchResult and their subclasses now take a covariant T (out T) so that hierarchical keys will not need type casting with used with Matchers. I1e453 b/525094876
  • The UriMatchResult constructor param for arguments map now defaults to an empty map. I3acdd
  • DeepLinkMatcher.Filter abstract class is now a functional interface. The filter constructor field is removed and instead should be passed directly in the subclass. I9eb7d b/522194187

Bug Fixes

  • Fixed popped entry disappearing immediately when popping to an entry that has a nested metadata containing lambda values. Idb872 b/520494430
  • Fixed UriDeepLinkMatcher so that it will return a null UriMatchResult instead of throwing MissingFieldException when required arguments are missing during matching. I5322f b/524663005
  • A UriDeeplinkMatcher containing uri with https scheme can only be matched with requests that also have https scheme. Ibfe22 b/522304329
  • Fix UriDeepLinkMatcher to correctly identify http scheme as a positive match with https when matching a DeepLinkRequest to a UriDeepLinkMatcher. I3a62b b/518804264
  • DeepLinkMatcher.MatchResult comparator now returns 0 by default when two results are equal. I48ddb b/518841353
  • UriDeepLinkMatcher will now return a null UriMatchResult instead of throwing an exception when match request fails due to missing required arguments. I669a7 b/470282247 b/512923412

API Changes

  • androidx.benchmark now has a minSdk of 24. Ic2a85
  • Add onForwardCompletedFallback to TestNavigationEventDispatcherOwner to enable tracking and testing of unhandled forward navigation events. I6bbd7
  • Add navigationEventInput to TestNavigationEventDispatcherOwner to simplify simulating navigation events in tests. I3ef48

Bug Fixes

  • Cleans up API information Ia8066
  • Ignore navigation events dispatched to disconnected inputs. Previously, dispatching events to a removed input would throw an IllegalStateException. I1a8bc b/515890298
  • Prevent symbol duplication with older JetBrains fork versions when upgrading to Compose Multiplatform 1.11.0. I4cc4d

There are no release notes for this artifact.

Bug Fixes

  • This library now uses JSpecify nullness annotations, which are type-use. Kotlin developers should use the following compiler arguments to enforce correct usage: -Xjspecify-annotations=strict, -Xtype-enhancement-improvements-strict-mode Ideef8 b/326456246
  • Merged public and experimental API files for n- thru t-paths I103c7 b/278769092

External Contribution

  • Merge palette-ktx into the palette library. All Kotlin extensions are now part of the main palette artifact. palette-ktx is now an empty artifact for compatibility. I3f1df

There are no release notes for this artifact.

API Changes

  • Make AnnotationView public I8219f
  • Make EditablePdfDocument and annotations classes public. I5b962
  • Introduced new pdf-core submodule Iea331
  • Relocated core pdf apis to new pdf-core artifact to decouple document models from the view implementation. I26e1f
  • Expose OcrProvider APIs to support image-based text recognition I5271b
  • Removed the deprecated parameterless onLoadDocumentSuccess() method from PdfViewerFragment and the deprecated isLinearized property from PdfDocument. I6b7ab
  • Autofill support for form filling is enabled.

Bug Fixes

  • Fixed an issue where horizontal scrolling was unreliable at page edges because scroll direction was not accounted for when managing touch event interception. I6bda5 b/505645009
  • Fixed an issue to ensure the fast scroller is always displayed when accessibility is enabled. Idaf5e b/513082550

API Changes

  • Lowered the minSdk of the androidx.photopicker:photopicker and androidx.photopicker:photopicker-compose libraries to 23, while the APIs still require to be called starting from 34. I94e42 b/524083018
  • Updating Embedded PhotoPicker Compose APIs (removing AbstractEmbeddedPhotoPickerState, renaming and change visibility of some fields from EmbeddedPhotoPickerState) Ie32c9 b/449786033

Bug Fixes

  • Updated Compose compileSdk to API 37. This means that a minimum AGP version of 9.2.0 is required when using Compose. Ic748a b/413674743

API Changes

  • Exposed RemoteDensityBehavior and density-behavior-aware constructors in RemoteCreationDisplayInfo as public APIs. Iafca2 b/524921038
  • Exposed densityBehavior in RemoteCreationDisplayInfo and RemoteComposeCreationState. Iae938 b/524921038
  • Made RemoteComposeCreationComposeFlags public. I1f899 b/467532762

Bug Fixes

  • Added lint check to warn about usage of standard Compose CompositionLocals in @RemoteComposable. Ic12ba
  • Remove requirement for compileSdk 37 If78b4
  • Removed obsolete rememberRemoteStringList documentation. I99722
  • Fixed font weight adjustment rendering when adjustment is undefined. I16704 b/522050705
  • Aligned BorderModifier to Compose behavior to draw inside the component bounds. Iae36c
  • Fixed RemoteComposeWriter to serialize DOC_PROFILES in the constructor. I3bbea
  • Fixed RemoteModifier.background native support for dynamic colors. If4f04 b/499049643

Features - Added typefaceResolver parameter to RemoteDocumentPlayer. Ie7cda b/524621320 - Added custom component support for the Compose player. Ic0559 - Optimized select operations where both alternatives are the same. I55b9e b/390355362

Major features of 3.0.0:

Room 3.0 (package androidx.room3) is a major version update of Room 2.x package (androidx.room) that focuses on Kotlin Multiplatform (KMP).

The core annotation APIs are kept the same along with the main components:

  • An abstract class that extends androidx.room3.RoomDatabase and is annotated with @Database is the entry point for Room's annotation processor.
  • The database declaration has one or more data classes describing the database schema and are annotated with @Entity.
  • Database operations are defined in @Dao declarations that contains query functions whose SQL statements are defined via the @Query annotation.
  • At runtime, the database implementation can be obtained via a RoomDatabase.Builder which is also used to configure the database.

Most of the documentation in the Save data in a local database using Room guide is still relevant to Room 3.0.

The major breaking differences between Room 2.x are as follows:

  • New package, androidx.room3.
  • SupportSQLite APIs are no longer supported, unless you are using the androidx.room3:room3-sqlite-wrapper.
  • All database operations are now Coroutine APIs based.
  • Kotlin code generation only.
  • Kotlin Symbol Processing (KSP) is required.

Along with breaking changes, Room 3.0 brings in new functionality compared to 2.x:

  • JS and WasmJS Support
  • Custom DAO Return Types
  • FTS5 support via @Fts5 annotation
  • Kotlin default parameter value support
  • PrimaryKey.algorihtm property to specify the primary key generating algorithm
  • Ability to create tables 'WITHOUT ROWID'
  • Composite relationship column with @Relation

New Package

To prevent compatibility issues with existing Room 2.x implementations and for libraries with transitive dependencies to Room (for example, WorkManager), Room 3.0 resides in a new package, which means it also has a new maven group and artifact ids. For example, androidx.room:room-runtime has become androidx.room3:room3-runtime and classes such as androidx.room.RoomDatabase will now be located at androidx.room3.RoomDatabase.

No SupportSQLite APIs

Room 3.0 is fully backed by the SQLiteDriver APIs and no longer references SupportSQLite types such as SupportSQLiteDatabase or Android types such as Cursor. This is the most significant change between Room 3.0 and 2.x since the RoomDatabase APIs that mirrored SupportSQLiteDatabase along with the API to get a SupportSQLiteOpenHelper have been removed. A SQLiteDriver is now required to build a RoomDatabase.

For example, APIs for direct database operations are replaced by driver equivalents:

// Room 2.x
roomDatabase.runInTransaction { ... }

// Room 3.x
roomDatabase.withWriteTransaction { ... }
// Room 2.x
roomDatabase.query("SELECT * FROM Song").use { cursor -> ... }

// Room 3.x
roomDatabase.useReaderConnection { connection ->
  connection.usePrepared("SELECT * FROM Song") { stmt -> ... }
}

Callback APIs that had as argument a SupportSQLiteDatabase have also been replaced by their equivalent API that has a SQLiteConnection as argument. These are migrations callback functions such as Migration.onMigrate() and AutoMigrationSpec.onPostMigrate() along with database callbacks such as RoomDatabase.Callback.onCreate(), RoomDatabase.Callback.onOpen(), etc.

If Room was being used in a KMP project, then migrating to 3.0 is simpler as it mostly involves updating import references, otherwise the same migration strategy from Room in Android-only to KMP applies, see the Room KMP Migration Guide.

SupportSQLite Wrapper

Room 3.x preserves the SupportSQLite wrapper created in 2.x to ease migrations and is now located in a new artifact androidx.room3:room3-sqlite-wrapper. The compatibility API allows you to convert a RoomDatabase into a SupportSQLiteDatabase. Invocations of roomDatabase.openHelper.writableDatabase can be replaced by roomDatabase.getSupportWrapper().

Kotlin and Coroutines First

To better evolve the library, Room 3.0 only generates Kotlin code and is only a Kotlin Symbol Processor (KSP). Compared to Room 2.x there is no Java code generation and configuration of annotation processor via KAPT or JavaAP is no longer possible in Room 3.0. Note that KSP is able to process Java sources and the Room compiler will generate code for database, entities or DAOs whose source declarations are in Java. It is recommended to have a multi-module project where Room usage is concentrated and the Kotlin Gradle Plugin and KSP can be applied without affecting the rest of the codebase.

Room 3.0 also requires the use of Coroutines, and more specifically DAO functions have to be suspending unless they are returning a reactive type, such as a Flow or a custom DAO return type. Room APIs to perform database operations are also suspend functions, such as RoomDatabase.useReaderConnection and RoomDatabase.useWriterConnection.

As opposed to Room 2.x it is no longer possible to configure a RoomDatabase with an Executor, instead a CoroutineContext along with a dispatcher can be provided via the database's builder.

InvalidationTracker APIs in Room 3.0 are Flow based, InvalidationTracker.Observer is removed along with its relevant APIs addObserver and removeObserver. The mechanism to react to database operation is through Coroutine Flows that can be created via the createFlow() API in the InvalidationTracker.

Example usage:

fun getArtistTours(from: Date, to: Date): Flow<Map<Artist, TourState>> {
    return db.invalidationTracker.createFlow("Artist").map { _ ->
        val artists = artistsDao.getAllArtists()
        val tours = tourService.fetchStates(artists.map { it.id })
        associateTours(artists, tours, from, to)
    }
}

Web Support

The Room 3.0 release adds JavaScript and WasmJs as KMP targets. Combined with the release of the SQLiteDriver interfaces (androidx.sqlite:sqlite) that also target JavaScript and WasmJs and a new driver WebWorkerSQLiteDriver located in the new artifact androidx.sqlite:sqlite-web, it is possible to use Room in common code that targets all major KMP platforms.

Due to the asynchronous nature of the web platforms, Room APIs that took SQLiteStatement as argument are now suspend functions. Example of these functions are Migration.onMigrate(), RoomDatabase.Callback.onCreate(), PooledConnection.usePrepared() and others. In the driver APIs the asynchronous APIs are common on all platforms and the synchronous are common for non-web targets. Therefore a project that does not target web can continue to use the synchronous APIs (SQLiteDriver.open(), SQLiteConnection.prepare() and SQLiteStatement.step()) in common code. Meanwhile a project that only targets web must use the asynchronous APIs (SQLiteDriver.openAsync(), SQLiteConnection.prepareAsync() and SQLiteStatement.stepAsync()).

For convenience the androidx.sqlite package also added suspend extension functions with the synchronous names of the mentioned APIs (with the addition of SQLiteConnection.executeSQL), these APIs are recommended when the project targets both web and non-web platforms since the APIs are expect / actual declarations that will call the right variant based on the platforms. These are the APIs Room's runtime use and enable driver usage in common code for all supported platforms.

Example usage:

import androidx.sqlite.executeSQL
import androidx.sqlite.step

roomDatabase.useWriterConnection { connection ->
    val deletedSongs = connection.usePrepared(
        "SELECT count(*) FROM Song"
    ) { stmt ->
        stmt.step()
        stmt.getLong(0)
    }
    connection.executeSQL("DELETE FROM Song")
    deletedSongs
}

The WebWorkerSQLiteDriver is an implementation of a SQLiteDriver that communicates with a Web Worker for performing database operation off the main thread and enables storing the database in the Origin Private File System (OPFS). To instantiate the driver a worker that implements a simple communication protocol is required, the protocol is described in the WebWorkerSQLiteDriver KDoc.

Currently the WebWorkerSQLiteDriver does not ship with a default worker that implements the communication protocol, but as an example, the androidx codebase contains a worker implementation that can be used in your project. It uses SQLite's WASM and stores the database in OPFS. The example worker is published as a local NPM package and thanks to Kotlin's support for NPM dependencies, a small KMP module can be created to serve the worker.

See the following GitHub project demonstrating the usage of a local web worker for Room.

Once a worker is set up in the project, then configuring Room for the Web is similar to other platforms:

fun createDatabase(): MusicDatabase {
    return Room.databaseBuilder<MusicDatabase>("music.db")
        .setDriver(WebWorkerSQLiteDriver(createWorker()))
        .build()
}

fun createWorker() =
    Worker(js("""new URL("sqlite-web-worker/worker.js", import.meta.url)"""))

A future version of the Web driver might contain a default worker published in NPM, making the web setup simpler.

Custom DAO Return Types

Various DAO return type integrations such as those for RxJava and Paging have been transformed to use a new API in Room 3.0 called DAO return type converters. A DAO return type converter function (@DaoReturnTypeConverter) enables transforming the result of a DAO function into a custom type defined by the annotated function. These functions enable participating in Room's generated code that transforms query results into data objects. Classes that contain DAO return type converters have to be registered via the @DaoReturnTypeConverters annotations in the @Database or @Dao declarations.

For example, to have a DAO query return a PagingSource, the converter class located in androidx.room3:room3-paging must now be registered:

@Dao
@DaoReturnTypeConverters(PagingSourceDaoReturnTypeConverter::class)
interface MusicDao {
    @Query("SELECT * FROM Song)
    fun getSongsPaginated(): PagingSource<Int, Song>
}

Existing integrations have been moved to DAO return type converters:

Return TypeConverter classArtifact
PagingSourcePagingSourceDaoReturnTypeConverterandroidx.room3:room3-paging
Observable, Flowable, Completable, Single, MaybeRxDaoReturnTypeConvertersandroidx.room3:room3-rxjava3
ListenableFutureGuavaDaoReturnTypeConverterandroidx.room3:room3-guava
LiveDataLiveDataDaoReturnTypeConverterandroidx.room3:room3-livedata

Like column type converters, DAO return type converters can be defined by the application. For example, an application could declare a @DaoReturnTypeConverter for the web type kotlin.js.Promise.

object PromiseDaoReturnTypeConverter {
    @DaoReturnTypeConverter([OperationType.READ, OperationType.WRITE])
    fun <T> convert(
        db: RoomDatabase,
        executeAndConvert: suspend () -> T
    ): Promise<T> {
        return db.getCoroutineScope().promise { executeAndConvert() }
    }
}

The above converter then allows DAO query functions to return Promise:

@Dao
@DaoReturnTypeConverters(PromiseDaoReturnTypeConverter::class)
interface MusicDao {
    @Query("SELECT * FROM Song")
    fun getAllSongs(): Promise<List<Song>>
}

A @DaoReturnTypeConverter function has a few requirements in the amount of parameter it must have and its types. The possible parameters are:

  • db: RoomDatabase: (Optional) Provides access to the RoomDatabase instance, which can be useful for performing additional database operations or accessing the coroutine scope.
  • tableNames: Array<String>: (Optional) Contains the accessed tables of the query, useful for supporting observable / reactive types when combined with Room's InvalidationTracker.createFlow() API.
  • rawQuery: RoomRawQuery: (Optional) Contains at runtime an instance of the query, enabling transformations such as the LIMIT / OFFSET strategy implemented by the PagingSourceDaoReturnTypeConverter.
  • executeAndConvert: suspend () -> T: (Required) The Room generated function that will execute the query and parse its result into data objects.

For more information about the requirements for creating a DAO return type converter, see the KDoc on the @DaoReturnTypeConverter API.

Important changes since 2.6.0:

  • Add js and wasmJs targets to androidx.sqlite:sqlite along with asynchronous version of the driver APIs: SQLiteDriver.open(), SQLiteConnection.prepare() and SQLiteStatement.step() for the web targets.
  • Existing projects that don't target web can continue using the synchronous APIs in common code, but once a project targets web then only the asynchronous APIs are available. For convenience a new artifact andriodx.sqlite:sqlite-async includes top-level suspend functions that use the synchronous naming scheme (along with executeSQL) and are expect / actual declarations that will invoke the right variant based on the platform. It is recommended to use these APIs for common code targeting both web and non-web targets.
  • This release also includes a new artifact androidx.sqlite:sqlite-web which contains WebWorkerSQLiteDriver, a SQLiteDriver implementation for the web that communicates with a Web Worker to perform database operation via a simple messaging protocol. The protocol is documented in the WebWorkerSQLiteDriver and even though there is no default worker implementation with the artifact, one can be provided via the constructor. For a more concrete example on how this new artifact can be used, check out the Room 3.0 release notes.

Important changes since 2.3.0:

The API surface of UiAutomator has been overhauled to provide:

  • A dedicated uiAutomator test scope for cleaner and more expressive test code.
  • Methods like onElement, onElements, and onElementOrNull for finding UI elements with clear predicates.
  • Built-in waiting mechanism for conditional elements onElement*(timeoutMs: Long = 10000)
  • Explicit app state management such as waitForStable and waitForAppToBeVisible.
  • Direct interaction with accessibility window nodes for multi-window testing scenarios.
  • Built-in screenshot capabilities and a ResultsReporter for visual testing and debugging.

To get started with the new APIs, see the UiAutomator 2.4+ guide.

API Changes

  • Added the TransformingLazyColumnFirstLayoutItemProvider interface in Foundation to enable customization of content that shifts direction during content updates, accompanied by out-of-the-box rememberTransformingLazyColumnFirstLayoutItemProvider and rememberTransformingLazyColumnFirstVisibleItemProvider implementations in Material3. I54814 b/503353428

  • Renamed the fallback parameter from current to centerItem in TransformingLazyColumnFirstLayoutItemProvider. Added TransformingLazyColumnState extensions firstVisibleItemLayoutItemInfo and layoutItemInfoOf, and updated rememberTransformingLazyColumnFirstLayoutItemProvider to use a clean, parameter-based lambda. I9a8d9 b/503353428

  • Add overloads for multi-slot Material3 Button and Card content, for use with one-handed gestures. I74ccb b/515718015 b/490343658

  • Add accessibility support to one-handed gestures. I0054d b/519085906

  • Rename OneHandedGestureDefaults.scrollToNextItem() to OneHandedGestureDefaults.scrollDownToNextItem and add wrapAround parameter to OneHandedGestureDefaults scroll functions I940ce b/509639667

  • Add non-composable Modifier.oneHandedGesture() if developer wants to provide the key manually. I191e1 b/504712626

  • Rename offsetOf API in RevealState to positionOf. I2675f b/522387997

  • Introduced actionContentSpacing parameter to SwipeToReveal, allowing developers to customize the distance between action slots and the content. I2abaf b/507073912

Bug Fixes

  • Fixed an issue in ScreenScaffold where recompositions could cause un-remembered ScrollInfoProvider to reset scroll tracking state. I98f6d b/524620765
  • TransformingLazyColumn scrollbar color follows gesture indicator background color during indicator animation I353fb b/524915104
  • Changed OneHandedGestureIndicator default gestureIndicatorTint to LocalContentColor I1abd3 b/524228063
  • Parameterize the content description of DatePicker's day and year pickers to support localization. I5dcd9 b/430563857
  • Introduce adaptive display frequencies to GestureIndicators based on whether an indicator renders inside or outside its host UI component. Ic618f b/515071642
  • Fix concurrency issue when triggering one-handed gestures I7b95f b/512086558

Vulnerability & Security Fixes

  • Enforced a 2048px dimension limit and 20MB raw size maximum on images to prevent memory exhaustion.
  • Enforced layout depth checks by fixing a bug that allowed deep layouts to skip depth enforcement during fingerprint optimizations.
  • Prevented an array bounds exception/crash caused by unbounded gap parameters in DashedArcLine.
  • Replaced uncaught IllegalArgumentExceptions with safer error logging and node invalidation in expression pipeline.
  • Fixed an uncaught NullPointerException when processing malformed image URIs.

Vulnerability & Security Fixes

  • Fixed a potential IllegalStateException race condition in TilesConnectionBinder that occurred during service connection callbacks called from unexpected threads.

API Changes

  • Added an HttpCache API, accessible via Profile#getHttpCache, providing the ability to query and manage the HTTP cache quota for a profile. This can benefit the performance and availability of apps which rely heavily on web-served static content, or alternatively reduce cache directory usage where HTTP caching is not needed. This feature requires WebView version M151 or higher. I40a7f b/501449506
  • Removed incorrect @RequiresFeature annotations on ScriptHandler and UserAgentMetadata#getFormFactors. Ib9550

Lint Checks

  • Introduced a lint warning for unhandled onRenderProcessGone callback. This callback gives developers an opportunity to gracefully recover from a render process shutting down rather than crashing their app. A warning will be linted if a WebViewClient has been used but it has not overridden this callback. Ia4e41