2023-11-29
Activity: v1.9.0-alpha01
November 29, 2023
androidx.activity:activity:1.9.0-alpha01, androidx.activity:activity-compose:1.9.0-alpha01, and androidx.activity:activity-ktx:1.9.0-alpha01 are released. Version 1.9.0-alpha01 contains these commits.
New Features
ComponentActivitynow implementsOnUserLeaveHintProviderto allow components to callbacks foronUserLeaveHintevents. (I54892)
API Changes
ComponentActivityhas been rewritten in Kotlin. (I14f31)ActivityResultCallerhas been rewritten in Kotlin. (Ib02e4)ActivityResultLauncherhas been rewritten in Kotlin. As part of that conversion, thegetContractmethod is now an abstract Kotlin property. This is a binary compatible change, but source breaking if your implementation ofActivityResultLauncheris written in Kotlin. (Id4615)PickVisualMediaRequestnow has the same minimum API level of 19 as thePickVisualMediaActivity Result contract. (Id6e21)
Dependency Update
- Activity now depends on Core
1.13.0-alpha01. (I14f31)
Annotation-Experimental: v1.4.0-alpha01
November 29, 2023
androidx.annotation:annotation-experimental:1.4.0-alpha01 is released. Version 1.4.0-alpha01 contains these commits.
Bug Fixes
- Temporarily remove class-level autofix suggestions to work around b/301598518. (Id98b2)
- Show warnings for Java usages of experimentally-annotated Kotlin properties (I8bd43)
- Fix placement of autofix annotation on Kotlin methods (Id7a41)
bluetooth: v1.0.0-alpha02
November 29, 2023
androidx.bluetooth:bluetooth:1.0.0-alpha02 and androidx.bluetooth:bluetooth-testing:1.0.0-alpha02 are released. Version 1.0.0-alpha02 contains these commits.
New Features
- Lower
minSdkVersionto 21
API Changes
GattServerConnectFlow#updateServicesbecomes a suspend function (I0237d)- Change
AdvertiseParams.durationMillisto Long (If6771) - Convert
openGattServerto Flow (Icef54) - Throw
ScanExceptionon scan fail and set scanner tosetLegacy(false)by default (Ib337c) - Throw
AdvertiseExceptionon advertise fail (I0e691) - Add general bluetooth exception to catch (I0130d)
- Convert advertise to Flow and change maximum duration (I32fd8)
- Add
serviceDataandserviceSolicitationUuidstoScanResult(I6d7f0) - Change
durationMillisfrom Long to Duration (I89d49) - Add rssi, and
periodicAdvertisingIntervaltoScanResult(I60b51) - Add
serviceSolicitationUuidandsolicitationUuidMasktoScanFilter(Ic2206) - Added
GattServerSessionScope#subscribedCharacteristics(I0edab) - Add
serviceSolicitationUuidstoAdvertiseParams(Ic9aa7) - Change
AdvertiseParams.durationMillisfrom Int to Long (I6873f) GattServerSessionScope#notifydoes not return but throws an exception if it fails (Ifc26f)
Bug Fixes
- Extract scan functionality (I4d43f)
Browser: v1.8.0-beta01
November 29, 2023
androidx.browser:browser:1.8.0-beta01 is released. Version 1.8.0-beta01 contains these commits.
New Features
- Add experimental support for Minimized Custom Tabs APIs. (I67f2d)
Collection: v1.4.0-beta02
November 29, 2023
androidx.collection:collection-*:1.4.0-beta02 is released. Version 1.4.0-beta02 contains these commits.
New Features - Improved performance of FloatFloatPair. (If5537)
Bug Fixes
ScatterMap.asMap()iterator now return new instances (I28932, b/310365754)
Compose Animation: v1.6.0-beta02
November 29, 2023
androidx.compose.animation:animation-*:1.6.0-beta02 is released. Version 1.6.0-beta02 contains these commits.
Compose Compiler: v1.5.5
November 29, 2023
androidx.compose.compiler:compiler:1.5.5 and androidx.compose.compiler:compiler-hosted:1.5.5 are released. Version 1.5.5 contains these commits.
Bug Fixes
- Fixes a crash during lookup of overridden composable types (Ib6d2c, b/297665426)
- Add
stabilityConfigurationPathto known parameters (previously bug prevented usage of configuration file flag). (b/309765121) - Memoization fixes (I081d1, I4d7bf)
- Recomposition fix by accounting for Uncertain param state in intrinsic remember (b/263402091)
- Fix debugging line information for intrinsic remember (Ic8cf5)
- Fix crash (IR lowering failed) during overridden composable types lookup at compile time (b/297665426)
- Add
External Contribution
- Memoize stable function references with arguments (I4d7bf, b/302680514)
Compose Foundation: v1.6.0-beta02
November 29, 2023
androidx.compose.foundation:foundation-*:1.6.0-beta02 is released. Version 1.6.0-beta02 contains these commits.
Bug Fixes
- Fix for
canScrollnot being updated after relayout-only scroll. (I60a86) - Fix for
Modifier.animateItemPlacement()andLookaheadScopeafter small scrolls. (I3a2b7)
Compose Material: v1.6.0-beta02
November 29, 2023
androidx.compose.material:material-*:1.6.0-beta02 is released. Version 1.6.0-beta02 contains these commits.
Compose Material 3: v1.2.0-alpha12
November 29, 2023
androidx.compose.material3:material3-*:1.2.0-alpha12 is released. Version 1.2.0-alpha12 contains these commits.
API Changes
RangeSlidernow takes a Kotlin range (e.g.,0f..1f) instead of a customFloatRangevalue class.SnapFlingBehavior.ktnow also uses a Kotlin range. (I025cb)- Mark Modifier factory functions as
@Stable. (Ib109f)
Compose Material3 Adaptive: v1.0.0-alpha02
November 29, 2023
androidx.compose.material3:material3-adaptive:1.0.0-alpha02, androidx.compose.material3:material3-adaptive-android:1.0.0-alpha02, and androidx.compose.material3:material3-adaptive-desktop:1.0.0-alpha02 are released. Version 1.0.0-alpha02 contains these commits.
API Changes
Bug Fixes
- Fix panes are not switched when
AnimatedPaneis not used (d88f181)
Compose Runtime: v1.6.0-beta02
November 29, 2023
androidx.compose.runtime:runtime-*:1.6.0-beta02 is released. Version 1.6.0-beta02 contains these commits.
Runtime Tracing: v1.0.0-beta01
November 29, 2023
androidx.compose.runtime:runtime-tracing:1.0.0-beta01 is released. Version 1.0.0-beta01 contains these commits.
Compose UI: v1.6.0-beta02
November 29, 2023
androidx.compose.ui:ui-*:1.6.0-beta02 is released. Version 1.6.0-beta02 contains these commits.
Core and Core-ktx: v1.13.0-alpha02
November 29, 2023
androidx.core:core:1.13.0-alpha02, androidx.core:core-ktx:1.13.0-alpha02, and androidx.core:core-testing:1.13.0-alpha02 are released. Version 1.13.0-alpha02 contains these commits.
New Features
- Adds the
OnUserLeaveHintProviderinterface to allow any component to receiveonUserLeaveHintevents necessary for implementing picture-in-picture. This is implemented byComponentActivityin Activity1.9.0-alpha01. (I54892)
API Changes
- Deprecated
androidx.core.os.CancellationSignal. Usages should be replaced with the platform-providedandroid.os.CancellationSignal. (Id45f6, b/309499026, b/309054079) - The
OnMultiWindowModeChangedProvider,OnNewIntentProvider,OnPictureInPictureModeChangedProvider,OnConfigurationChangedProvider, andOnTrimMemoryProviderinterfaces have been converted to Kotlin to ensure that the generic parameters on theConsumerthat their listener methods take have the correct nullability (they are all non-null). (Ib6237) - The
MultiWindowModeChangedInfoandPictureInPictureModeChangedInfoclasses that are sent to theConsumeradded to their respective Provider interfaces are now written in Kotlin. (Ie08e2)
Dependency Update
- Core now depends on Lifecycle
2.6.2. (I2d94c)
DataStore: v1.1.0-alpha07
November 29, 2023
androidx.datastore:datastore-*:1.1.0-alpha07 is released. Version 1.1.0-alpha07 contains these commits.
API Changes
- Make
MultiProcessDataStoreFactorymethods no longer experimental by removing@ExperimentalMultiProcessDataStoreannotations. (Ieee54)
Bug Fixes
- Rollout the removal of
@ExperimentalMultiProcessDataStoreannotations to 1.1.0-alpha07. (I8e607)
Fragment: v1.7.0-alpha07
November 29, 2023
androidx.fragment:fragment-*:1.7.0-alpha07 is released. Version 1.7.0-alpha07 contains these commits.
Bug Fixes
- Fixed a
NullPointerExceptioncaused by setting a shared element transition and failing to set an enter/exitTransition as well. (I8472b) - From Fragment
1.6.2: When the Fragment of aFragmentContainerViewis inflated, its states such asFragmentManager, Host, and id are now accessible in theonInflatecallback. (I1e44c, b/307427423) - From Fragment
1.6.2: When usingclearBackStackto remove a set of fragments, any nested Fragment'sViewModelwill now be cleared when the parent fragment’sViewModelsare cleared. (I6d83c, b/296173018)
Games-Activity: v3.0.0-beta01
November 29, 2023
androidx.games:games-activity:3.0.0-beta01 and androidx.games:games-text-input:3.0.0-beta01 are released. Version 3.0.0-beta01 contains these commits.
Games-Memory-Advice version 2.1: v2.1.0-beta01
November 29, 2023
androidx.games:games-memory-advice:2.1.0-beta01 is released. Version 2.1.0-beta01 contains these commits.
Games Performance Tuner 2.0: v2.0.0-alpha07
November 29, 2023
androidx.games:games-performance-tuner:2.0.0-alpha07 is released. Version 2.0.0-alpha07 contains these commits.
Bug Fixes
- Fixed memory telemetry reporting sometimes reporting wrong values
Graphics Path: v1.0.0-beta01
November 29, 2023
androidx.graphics:graphics-path:1.0.0-beta01 is released. Version 1.0.0-beta01 contains these commits.
API Changes
- Removed usages of experimental
isAtLeastU()API (Ie9117, b/289269026)
Bug Fixes
- Various fixes and performance improvements, including how the library deals with conics.
Media: v1.7.0
November 29, 2023
androidx.media:media:1.7.0 is released. Version 1.7.0 contains these commits.
Important changes since 1.6.0
- Catch
ForegroundServiceStartNotAllowedExceptioninMediaButtonReceiverand forward it toonForegroundServiceStartNotAllowedException. (I0c939) - Add
BROWSER_SERVICE_EXTRAS_KEY_FAVORITES_MEDIA_ITEMfor passing Favorites media item inMediaBrowserCompatroot extras. (Id3a11) - Add extras to set browse custom actions in
MediaBrowserCompatroot extras andMediaItemdescriptions. (Iab163) - Fix
IllegalStateExceptioncaused by returning null fromMediaBrowserService.onLoadChildrenon older Android versions.
Media2: v1.3.0-beta01
November 29, 2023
androidx.media2:media2-*:1.3.0-beta01 is released with no changes from Media2 1.3.0-alpha01. Version 1.3.0-beta01 contains these commits.
Room: v2.6.1
November 29, 2023
androidx.room:room-*:2.6.1 is released. Version 2.6.1 contains these commits.
Bug Fixes
- Resolved issue in generated code where the default value for Double columns in
EntityCursorConverterwas being set to 0 instead of 0.0. A potential fix for a similar edge-case for Float type columns has also been included. (Id75f5, b/304584179) - Exceptions thrown from
PagingSourceloads will now be propagated as aLoadStateUpdateofLoadResult.Errorcontaining the Throwable. This error state is observable throughPagingDataAdapter.loadStateFlow(Views)orLazyPagingItems.loadState(Compose). Note that this marks a behavioral change where in the past load errors will bubble up as an Exception thrown by the dao method that triggered the load. (I93887, b/302708983)
Tracing: v1.2.0
November 29, 2023
androidx.tracing:tracing:1.2.0 and androidx.tracing:tracing-ktx:1.2.0 are released. Version 1.2.0 contains these commits.
Important changes since 1.1.0
- Add
trace()andtraceAsync()variants with lazy string and cookie computation. Also now correctly skipsTrace.endifTrace.beginthrows.
Transition: v1.5.0-alpha05
November 29, 2023
androidx.transition:transition:1.5.0-alpha05 and androidx.transition:transition-ktx:1.5.0-alpha05 are released. Version 1.5.0-alpha05 contains these commits.
Bug Fixes
- Fixed a
NullPointerExceptioncaused by setting a shared element transition and failing to set anenter/exitTransitionas well. (I8472b) - Fixed issue where
animateToStart()withSlide()failed to move the View back to the start position (I698f4, b/300157785) - Fixed reentrancy problem in Transition which broke cancellation. (Iddcce, b/308379201)
Versionedparcelable: v1.2.0-beta01
November 29, 2023
androidx.versionedparcelable:versionedparcelable:1.2.0-beta01 is released with no changes since 1.2.0-alpha01. Version 1.2.0-beta01 contains these commits.
Wear Tooling Preview: v1.0.0
November 29, 2023
androidx.wear:wear-tooling-preview:1.0.0 is released. Version 1.0.0 contains these commits.
Features in 1.0.0
- Add
WearDevicesto list valid wear devices that can be used for UI previews.
wear protolayout: v1.1.0-alpha03
November 29, 2023
androidx.wear.protolayout:protolayout-*:1.1.0-alpha03 is released. Version 1.1.0-alpha03 contains these commits.
New Features
- Add experimental support for dynamically hiding/unhiding layout elements (I64a78)
- Add dynamic value support to
BoolProp(I2fe96) - Add schema version requirement annotation to
ProtoLayoutAPIs (I0f03c) - Extending the API with the new option in
TextOverflowfor ellipsizing the Text in a fixed parent container even when max lines is not reached (but there's not enough space for Text). (I110a9) - Added helper method
DimensionBuilders.weightfor buildingExpandedDimensionPropwith weight. (I4f72b) DynamicInstantandDynamicDurationcan be used as state or platform data types. (I6819f)
API Changes
- Update The API to hide
DynamicZonedDateTimeand move all its operations toDyanamicInstant(I34b94) - Spacer now supports Expanded dimension for width/height. (Ie7c94)
- Support click target area extension in Renderer (I39c79)
Wear Tiles: v1.3.0-alpha03
November 29, 2023
androidx.wear.tiles:tiles-*:1.3.0-alpha03 is released. Version 1.3.0-alpha03 contains these commits.
New Features
- Added a new API
TileService#getActiveTilesSnapshotAsyncfor querying which tiles belonging to the app are active. (I6850e)
API Changes
- Rename
@TilePreviewto@Preview(Ifc08a)
Wear Watchface: v1.2.0
November 29, 2023
androidx.wear.watchface:watchface-*:1.2.0 is released. Version 1.2.0 contains these commits.
Important changes since 1.1.0
- We’ve added support some new complication types which are available for use from Android T:
GoalProgressComplicationDatawhich is similar toRangedValueComplicationDataexcept it's for progress towards a goal where min implicitly is zero, and the value is allowed to be larger thantargetValue.WeightedElementsComplicationDatawhich consists of an array of Elements (pairs of weight and color) along with optional text/title/image. These might be displayed as a pie chart where the colors need to be meaningful given the context, since there typically isn't room in a complication to render labels.
- We’ve added support for optional
ColorRangestoRangedValueComplicationData. Normally complications would be rendered in colors of the watch face's choosing, but sometimes theComplicationDataSourceis best placed to set the colors e.g. when they have a particular semantic meaning. E.g. red to blue for temperature. - Almost every type of
ComplicationDatanow supportsSmallImages. - We've added
ComplicationDisplayPolicywhereDO_NOT_SHOW_WHEN_DEVICE_LOCKEDinstructs a compatible watch face to not display the complication when the device is locked. - From Android T, OEMs will be able to determine if a complication request is from a watch face in the list defined by the
android.support.wearable.complications.SAFE_WATCH_FACESmetadata in their provider’s manifest byComplicationRequest#isForSafeWatchFace. The provider will need thecom.google.wear.permission.GET_IS_FOR_SAFE_WATCH_FACEpermission to receive anything other than TargetWatchFaceSafety.UNKNOWN`. UserStyleFlavorshas become a non-experimental feature.
Webkit: v1.10.0-alpha01
November 29, 2023
androidx.webkit:webkit:1.10.0-alpha01 is released. Version 1.10.0-alpha01 contains these commits.
New Features
- Added a new API to
WebSettingsCompatto control the experimental Android WebView Media Integrity API behaviour by either disabling the API entirely, or restrict sharing the application identity in the API response. This can be toggled for all origins and on a per origin basis.
Webkit: v1.9.0
November 29, 2023
androidx.webkit:webkit:1.9.0 is released. Version 1.9.0 contains these commits.
Important changes since 1.8.0
- Added a new multi-profile API for WebViews.
- The Profile interface has different APIs to use to get associated data with this profile such as its name, GeoLocationPermissions, ServiceWorkerController, CookieManager and WebStorage. These objects are specific to the profile, and information is not shared between different profiles in the application.
- The profile used by a
WebViewinstance can be changed using the WebViewCompat#setProfile method and retrieved using WebViewCompat#getProfile - The newly introduced ProfileStore let you manage the available profiles in your application, including the default profile.
- Existing WebView APIs such as CookieManager#getInstance will continue to operate on the Default profile.
- Added an API to inject and run Javascript before page load.
- The WebViewCompat#addDocumentStartJavascript API allows apps to inject scripts into a
WebViewwhich are guaranteed to run before any page scripts are executed. The API allows the app to specify a target list of origins for the script to be enabled on, ensuring that it only runs on intended pages. Unlike WebView#evaluateJavascript, this API will allow execution of scripts in embedded Iframes when they load. Apps can use this new API in combination with WebViewCompat#addWebMessageListener to set up two-way communication with JavaScript in the page in a reliable way.
- The WebViewCompat#addDocumentStartJavascript API allows apps to inject scripts into a
- Added APIs to modify how Privacy Sandbox Attribution Reporting events are registered.
- We introduced a new API WebSettingsCompat#setAttributionRegistrationBehavior which allows developers to configure whether attribution sources and triggers are registered as coming from the app itself or coming from the web content in the WebView. This method can also be used to disable Attribution Reporting in WebView. Additionally we added a new API
WebSettingsCompat#getAttributionRegistrationBehaviorto get the current behavior. - For more information see the Privacy Sandbox documentation.
- We introduced a new API WebSettingsCompat#setAttributionRegistrationBehavior which allows developers to configure whether attribution sources and triggers are registered as coming from the app itself or coming from the web content in the WebView. This method can also be used to disable Attribution Reporting in WebView. Additionally we added a new API
- Added APIs to override user-agent metadata for client hints.
- We introduced a new API, WebSettingsCompat#setUserAgentMetadata to override the user-agent metadata for WebView used to populate the user-agent client hints, and we also added another new API WebSettingsCompat#getUserAgentMetadata to get current user-agent overrides. We encourage apps to use the new API to set the right override values whenever the app changes the default user agent string using WebSettings.setUserAgentString to ensure the correct values are being used in all situations.
WorkManager: v2.9.0
November 29, 2023
androidx.work:work-*:2.9.0 is released. Version 2.9.0 contains these commits.
Important changes since 2.8.0
- Observability via
Flow-s. Instead ofLiveData, Worker's progress now can be observed via Flow’s viaWorkManager.getWorkInfosFlowand similar methods. - Now
WorkManagerprovides a hint on why a worker was previously stopped. It can be queried from a worker itself viagetStopReason()method or fromWorkInfoviagetStopReason(). - Precise scheduling of periodic workers via
setNextScheduleTimeOverride. This allows dynamic calculation of the next Periodic work schedule, which can be used to implement advanced features like adaptive refresh times, custom retry behavior, or making a newsfeed worker run before the user wakes up every morning without drift.ExistingPeriodicWorkPolicy.UPDATEshould be used with these techniques to avoid canceling a currently-running worker while scheduling the next one. - WorkManager’s testing with threading matching production.
ExecutorsMode.PRESERVE_EXECUTORScan be used ininitializeTestWorkManagerto preserve executors set inConfigurationand to use the real main thread. - Coroutines APIs such as
CoroutineWorkerhave been moved from additional artifact work-runtime-ktx to the main artifact work-runtime. work-runtime-ktx is now empty.
API Changes
stopReasonwas added toWorkInfo. It makesstopReasonavailable after the worker has run. It could be helpful in the reportingstopReasonin a usable way, because once a worker has been stopped, an app itself could be killed very quickly. (I21386)- Allow
Clockto be set via config and used to drive execution sequencing of Worker tests. (Ic586e) getStopReason()method was added toListenableWorkerthat gives a hint why the worker was stopped. (I07060)- Added
WorkManagerTestInitHelper#closeWorkDatabase()to avoid Closeguard's warning about leaked resources. (Ia8d49) WorkInfo's constructor is public now, which can be useful in testing. (Ia00b6, b/209145335)work-runtime-ktxis now empty,CoroutineWorkerand other Kotlin specific utilities are now available in the main work-runtime artifact. (I71a9a)- Added
setNextScheduleTimeOverridemethod, which allows accurate setting of periodic work schedules (I3b4da) - Added
getNextScheduleTimeMillisto get scheduled run time info is added toWorkInfo. (I797e4) - Initial delay and periodicity info are added to
WorkInfo. (I52f2f) - Added method observe workers via Flows via methods
getWorkInfosByTagFlow,getWorkInfoByIdFlow,getWorkInfosForUniqueWorkFlow,getWorkInfosFlow(If122a) - Added missing
@RequiresApi(...)annotations toConstraints' constructors and properties. They are now aligned with corresponding annotations on setters inConstraints.Builderthat existed from early versions ofWorkManager. (I6d7d2) WorkManagernow has a separate limit for content uri workers to give them guaranteed slots inJobSchedulerto prevent missing content updates under the high load. The limit can be configured viaConfiguration.Builder.setContentUriTriggerWorkersLimit. (Ic128f)- Constraints are added to
WorkInfo. (I162c0)