- Room defaults to a built-in Enum to String and String to Enum type converter when no type converter is provided for an enum, and prioritizes an existing enum type converter over the default one.
- A general RoomDatabase.QueryCallback API is available for callbacks invoked when queries are about to execute, useful for logging in debug builds, and can be set via RoomDatabase.Builder#setQueryCallback().
- APIs are available for creating a database from a pre-packaged database read from an input stream, supporting cases such as gzipped pre-packaged databases.
- APIs are available for providing type converter instances to Room so the app can control their initialization, marked with the new @ProvidedTypeConverter annotation.
- RxJava3 types are supported, allowing DAO methods to return Flowable, Single, Maybe and Completable, with the new androidx.room:room-rxjava3 artifact.
- Room generates implementations for @Query annotated methods whose return type is androidx.paging.PagingSource, supporting Paging 3.0.
From Room
Built-in Enum Support: Room will now default to using an Enum to String and vice versa type converter if none is provided. If a type converter for an enum already exists, Room will prioritize using it over the default one. Query Callback: Room now offers a general callback API RoomDatabase.QueryCallback, for when queries are about to execute, which can be useful for logging in debug builds. The callback can be set via RoomDatabase.Builder#setQueryCallback(). Pre-packaged Improvement: Room now has APIs for creating a database using a pre-packaged database read from an input stream. This allows for cases such as when the pre-package database is gzipped. Provided Type Converters: Room now has APIs for providing instances of type converters such that the app can control their initialization. To mark a type converter that will be provided to Room use the new annotation @ProvidedTypeConverter. RxJava3 Support: Room now supports RxJava3 types. Similar to RxJava2 you can declare DAO methods whose return type are Flowable, Single, Maybe and Completable. Additionally a new artifact androidx.room:room-rxjava3 is available to support RxJava3. Paging 3.0 Support: Room will now support generating implementations for @Query annotated methods whose return type is androidx.paging.PagingSource.