Skip to content

Releases: mahozad/androidx-release-notes

2025-01-29

29 Jan 18:44

Choose a tag to compare

Benchmark: v1.4.0-alpha07

January 29, 2025

androidx.benchmark:benchmark-*:1.4.0-alpha07 is released. Version 1.4.0-alpha07 contains these commits.

New Features

  • BaselineProfileRule now introduces a collectWithResults(...) API which includes a list of paths to the computed profiles. (I056f8)
  • Added androidx.benchmark.measureRepeatedOnMainThread.throwOnDeadline instrumentation argument, which can be set to false to disable the throw on deadline behavior of measureRepeatedOnMainThread for local testing. Not otherwise recommended, as this increases the likelihood of ANRs during tests. (Idbeec, b/353226476)

API Changes

  • Added @JvmOverloads to MicrobenchmarkConfig constructor. (I13fd3)
  • Refactored BenchmarkRule to be built on top of coroutines, and support better yield() behavior. This refactor removed several experimental BenchmarkState APIs, but will be followed by replacements as needed. Additionally, added runWithMeasurementDisabled to clarify behavior (all measurement is paused). In the future, runWithTimingDisabled will be deprecated. (I19837, b/389149423, b/311242861)
  • Move PerfettoTraceProcessor to TraceProcessor in a new androidx.benchmark:benchmark-traceprocessor artifact, and make most of its API non-experimental. Any custom TraceMetric or anything reading from traces will need to update to the new TraceProcessor import. The new TraceProcessor API works exactly like the old one, but is a standalone interface library (somewhat analogous to the androidx.sqlite layer from Room) with an Android-specific implementation built into macrobenchmark. The new artifact can be used on JVM as well, but currently you'll need to start your own copy of the TraceProcessor binary and offer a port to connect to it on. (I3a767, I62563, b/381134564)

Bug Fixes

  • Throw a clearer error message when MacrobenchmarkScope.startActivityAndWait fails to launch the target process (potentially due to a crash in the target process), instead of the more ambiguous 'Unable to confirm activity launch completion' message (I3539b)
  • Fixed several syntax errors in Kotlin samples, and syntax highlighting in several Java / build.gradle samples. (Ib3808)
  • Clarified ArtMetric and CaptureInfo parameter docs. (I96e60)

Browser: v1.9.0-alpha01

January 29, 2025

androidx.browser:browser:1.9.0-alpha01 is released. Version 1.9.0-alpha01 contains these commits.

API Changes

  • Added browser connection/session support to Auth Tab. (I6e47b)
  • Added a new API CustomTabsSession#isEphemeralBrowsingSupported that determines whether or not the ephemeral browsing is supported (Ie4dea, b/384548523)
  • Added color scheme params support to Auth Tab APIs. (I630e1)
  • Added experimental ephemeral browsing option to Custom Tabs (I9549d)
  • Updated experimental Auth Tab APIs (I8b674)
  • Add new API to check if the Custom Tabs provider supports multi-network. (I4307a)
  • Add new service intent filter category to support multi-network. (I4354a)
  • Add new API to set/get the bound network when launching a URL over a custom tab. (I493e1)
  • Added experimental Auth Tab APIs (I9b4d4)
  • New experimental APIs for PendingSession (Ib40e5)

Bug Fixes

  • Updated AuthTabIntent Javadocs (I2490c)
  • Fixed session support in Auth Tab (I4e280)
  • 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 (Ic7bf5, b/326456246)
  • 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. (I9496c, b/345472586)

External Contribution

  • Introduce a new IPC call ICustomTabsService#prefetchWithMultipleUrls to avoid multiple IPC calls for single URLs. (Ie5025)
  • Make CustomTabsSession#prefetch propagate CustomTabsSession’s session id(mID) to CustomTabsService. (I4ec7b)
  • Add a new experimental APICustomTabsSession#prefetch(List<Uri>, PrefetchOptions), which overloads the existing API to accept multiple URLs. (I54f35)
  • Add a new experimental API CustomTabsSession#prefetch(Uri, PrefetchOptions), which tries to prefetch the main page (without subresources) for future navigations. (I340cf)

Collection: v1.5.0-beta03

January 29, 2025

androidx.collection:collection-*:1.5.0-beta03...

Read more

2025-01-15

15 Jan 18:42

Choose a tag to compare

Activity: v1.10.0

January 15, 2025

androidx.activity:activity:1.10.0, androidx.activity:activity-compose:1.10.0, and androidx.activity:activity-ktx:1.10.0 are released. Version 1.10.0 contains these commits.

Important changes since 1.9.0

  • PhotoPicker now allows picking images in order and choosing which tab (either albums or images) should be initially visible.
  • The PickVisualMedia and PickMultipleVisualMedia Activity Result contracts that trigger the Photo Picker no longer directly delegates to Google Play services if the system Photo picker is not available, but uses the public ACTION_SYSTEM_FALLBACK_PICK_IMAGES action and related extras to provide a consistent Photo Picker experience to OEMs and system apps as a fallback.
  • New LocalActivity composition local that provides the Activity for the current scope, removing the need for developers to get an Activity from the LocalContext.

AppSearch: v1.1.0-beta01

January 15, 2025

androidx.appsearch:appsearch-*:1.1.0-beta01 is released. Version 1.1.0-beta01 contains these commits.

New Features

  • AppSearch module enters Beta.

API Changes

  • Disable experimental AppSearch delete propagation API due to stability issues. (Iea386)
  • Create GlobalSearchApplicationInfo API, an experimental and optional way for producers and consumers to indicate interest in certain types. (I116fd)
  • Minor changes to experimental AST (query builder) APIs (Ibd852)

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. (Ic2976, b/326456246)
  • Adds required permission to searchPersonCorpus (I4431d)

Camera: v1.5.0-alpha05

January 15, 2025

androidx.camera:camera-*:1.5.0-alpha05 is released. Version 1.5.0-alpha05 contains these commits.

API Changes

  • Add VideoCapture.getSelectedQuality() to know the selected Quality based on the QualitySelector. (I70508, b/204288986)
  • When an image capture is invoked with the ImageCapture.OnImageCapturedCallback API, the ImageInfo at the returned ImageProxy can now be used to know whether flash was fired through the new ImageInfo.getFlashState() API. (Id2c61, b/380527406)
  • Added OUTPUT_IMAGE_FORMAT_NV21 output format support for ImageAnalysis. (I484ab)
  • Remove the experimental annotation of the featurecombinationquery artifact (I4427f)
  • Adjust the zoom ratio range allowed for CameraControl by Extensions-specific characteristics when an extensions mode is enabled. (I85af1)

Bug Fixes

  • Upgraded compileSdk as 35 for using Android 15 related API. Apps using CameraX libraries will also need to upgrade their compileSdk config setting. (Ic80cd)
  • 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 (Idc6c6, b/326456246)

camera viewfinder: v1.4.0-alpha12

January 15, 2025

androidx.camera.viewfinder:viewfinder-compose:1.4.0-alpha12, androidx.camera.viewfinder:viewfinder-core:1.4.0-alpha12, and androidx.camera.viewfinder:viewfinder-view:1.4.0-alpha12 are released. Version 1.4.0-alpha12 contains these commits.

New Features

  • Upgraded compileSdk as 35 for using Android 15 related API. Apps using CameraX libraries will also need to upgrade their compileSdk config setting. (Ic80cd)
  • 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 (I7bcd7, b/326456246)

Car App: v1.7.0-rc01

January 15, 2025

androidx.car.app:app-*:1.7.0-rc01 is released with no notable changes from beta03. Version 1.7.0-rc01 is a contains these commits.

  • This is the first RC that includes the fix for CVE-2024-10382 patched on beta03. If you are using a lower version than 1.7-beta03, please update to use this version.

Collection: v1.5.0-beta02

January 15, 2025

androidx.collection:collection-*:1.5.0-beta02 is released. Version 1.5.0-beta02 contains these commits.

Compose Animation: v1.8.0-alpha08

January 15, 2025

androidx.compose.animation:animation-*:1.8.0-alpha08 is released. Version 1.8.0-alpha08 contains these commits.

Bug Fixes

  • Fixed incorrect placement animation from animateBounds in LazyGrid due to MotionFrameOfReferencePlacement being reset. (
Read more

2024-12-20

21 Dec 18:40

Choose a tag to compare

Media3: v1.6.0-alpha01

December 20, 2024

androidx.media3:media3-*:1.6.0-alpha01 is released. Version 1.6.0-alpha01 contains these commits.

  • Common Library:
    • Remove Format.toBundle(boolean excludeMetadata) method, use Format.toBundle() instead.
    • Add AudioManagerCompat and AudioFocusRequestCompat to replace the equivalent classes in androidx.media.
  • ExoPlayer:
    • Consider language when selecting a video track. By default, select a 'main' video track that matches the language of the selected audio track, if available. Explicit video language preferences can be expressed with TrackSelectionParameters.Builder.setPreferredVideoLanguage(s).
    • Add selectedAudioLanguage parameter to DefaultTrackSelector.selectVideoTrack() method.
    • Add retryCount parameter to MediaSourceEventListener.onLoadStarted and corresponding MediaSourceEventListener.EventDispatcher methods.
    • Fix bug where playlist items or periods in multi-period DASH streams with durations that don't match the actual content could cause frame freezes at the end of the item (#1698).
    • Reduce default values for bufferForPlaybackMs and bufferForPlaybackAfterRebufferMs in DefaultLoadControl to 1000 and 2000 ms respectively.
    • Add MediaExtractorCompat, a new class that provides equivalent features to platform MediaExtractor.
    • Move BasePreloadManager.Listener to a top-level PreloadManagerListener.
    • RenderersFactory.createSecondaryRenderer can be implemented to provide secondary renderers for pre-warming. Pre-warming enables quicker media item transitions during playback.
    • Enable sending CmcdData for manifest requests in adaptive streaming formats DASH, HLS, and SmoothStreaming (#1951).
    • Provide MediaCodecInfo of the codec that will be initialized in MediaCodecRenderer.onReadyToInitializeCodec (#1963).
    • Change AdsMediaSource to allow the AdPlaybackStates to grow by appending ad groups. Invalid modifications are detected and throw an exception.
  • Transformer:
    • Update parameters of VideoFrameProcessor.registerInputStream and VideoFrameProcessor.Listener.onInputStreamRegistered to use Format.
    • Add support for transmuxing into alternative backward compatible formats.
    • Generate HDR static metadata when using DefaultEncoderFactory.
  • Extractors:
    • AVI: Fix handling of files with constant bitrate compressed audio where the stream header stores the number of bytes instead of the number of chunks.
  • Audio:
    • Fix onAudioPositionAdvancing to be called when playback resumes (previously it was called when playback was paused).
  • Video:
    • Fix MediaCodecVideoRenderer such that when without a Surface, the renderer skips just-early frames only if the VideoFrameReleaseControl.getFrameReleaseAction is not FRAME_RELEASE_TRY_AGAIN_LATER.
  • Text:
    • Stop eagerly loading all subtitle files configured with MediaItem.Builder.setSubtitleConfigurations, and instead only load one if it is selected by track selection (#1721).
  • Effect:
    • Moved the functionality of OverlaySettings into StaticOverlaySettings. OverlaySettings can be subclassed to allow dynamic overlay settings.
  • Muxers:
    • Moved MuxerException out of Muxer interface to avoid a very long fully qualified name.
  • Session:
    • Add 'Context' as a parameter to 'MediaButtonReceiver.shouldStartForegroundService` (#1887).
  • UI:
    • Add PlayerSurface Composable to media3-ui-compose module.
    • Add PlayPauseButtonState, NextButtonState, PreviousButtonState, RepeatButtonState, ShuffleButtonState classes and the corresponding rememberPlayPauseButtonState, rememberNextButtonState, rememberPreviousButtonState, rememberRepeatButtonState, rememberShuffleButtonState composables to media3-ui-compose module.
  • HLS Extension:
    • Add a first version of HlsInterstitialsAdsLoader. The ads loader reads the HLS interstitials of an HLS media playlist and maps them to the AdPlaybackState that is passed to the AdsMediaSource. This initial version only supports HLS VOD streams with X-ASSET-URI attributes.
    • Add HlsInterstitialsAdsLoader.AdsMediaSourceFactory. Apps can use it to create AdsMediaSource instances that use an HlsInterstitialsAdsLoader in a convenient and safe way.
  • DASH Extension:
    • Add AC-4 Level-4 format support for DASH (#1898).
  • Decoder Extensions (FFmpeg, VP9, AV1, etc.):
    • Add the MPEG-H decoder module which uses the native MPEG-H decoder module to decode MPEG-H audio (#1826).
  • Demo app:
    • Add MinimalControls (PlayPauseButton, NextButton, PreviousButton) and ExtraControls (RepeatButton, ShuffleButton) Composable UI elements to demo-compose utilizing PlayPauseButtonState, NextButtonState, PreviousButtonState, RepeatButtonState, ShuffleButtonState.
  • Remove deprecated symbols:
    • Remove deprecated AudioMixer.create() method. Use DefaultAudioMixer.Factory().create() instead.
    • Remove the following deprecated Transformer.Builder methods:
      • setTransformationRequest(), use setAudioMimeType(), setVideoMimeType(), and setHdrMode() instead.
      • setAudioProcessors(), set the audio processor in an EditedMediaItem.Builder.setEffects(), and pass it to Transformer.start() instead.
      • setVideoEffects(), set video effect in an EditedMediaItem.Builder.setEffects(), and pass it to Transformer.start() instead.
      • setRemoveAudio(), use EditedMediaItem.Builder.setRemoveAudio() to remove the audio from the EditedMediaItem passed to
Read more

2024-12-11@07PM

12 Dec 18:48

Choose a tag to compare

ARCore for Jetpack XR: v1.0.0-alpha01

December 12, 2024

androidx.xr.arcore:arcore-* 1.0.0-alpha01 is released.

Features of initial release

Inspired by the existing ARCore library, the ARCore for Jetpack XR library provides capabilities for blending digital content with the real world. This library includes motion tracking, persistent anchors, hit testing, and plane identification with semantic labeling (for example, floor, walls, and tabletops). View the developer guide to learn more about working with ARCore for Jetpack XR.

  • Session: ARCore for Jetpack XR uses the Jetpack XR Runtime under-the-hood to power its functionality. You will use a Session to interact with most ARCore for Jetpack XR APIs, so please take a look at its documentation.

  • Plane: Use planes to understand the world around you. Each plane has a Label that describes it semantically. You can use subscribe to be notified about the latest detected planes or state to be notified about the changes to a specific plane.

  • Anchor: A link between a virtual object and a real world location. Anchors can be attached to a specific location in space (using create) or a Trackable (using createAnchor).

    • Anchors can be reused across sessions. You can use persist to store them, getPersistedAnchorUuids to enumerate them and load to retrieve them. Make sure that you unpersist them once they are no longer in use.

    • Anchors are interoperable between ARCore for Jetpack XR and Jetpack SceneCore. You can create an AnchorEntity using an anchor or, if you have an existing AnchorEntity, you can use getAnchor to retrieve its backing anchor.

    • Offer natural user interactions using hitTest. A hitTest uses a Ray to determine which contents it intersects and to create an Anchor from that location. Consider conducting a hitTest from an InputEvent.

Known Issues

  • There might be a delay between calling unpersist and its UUID being removed from the results returned by getPersistedAnchorUuids.

  • create will not validate that the system has enough resources to return new anchors. Creating an excessive amount of anchors might lead to a crash.

  • Persisting an Anchor that was previously persisted and unpersisted is not currently supported.

  • Usage in the emulator is supported, but the behavior might not be as stable as when running on an actual device. Particularly, calls to create might fail with a native code error and immediately terminate the activity.

  • In certain circumstances, a RuntimeException might be erroneously thrown when calling persist with the message “Anchor was not persisted”. In those circumstances, the function would still succeed and the anchor will be persisted. We recommend wrapping the call to persist with a try block as a workaround.

Jetpack Compose for XR: v1.0.0-alpha01

December 12, 2024

androidx.xr.compose:compose-*1.0.0-alpha01 is released.

Features of Initial Release

  • Initial developer release of Jetpack Compose for XR. Use familiar Compose concepts such as rows and columns to create spatial UI layouts in XR, whether you're porting an existing 2D app to XR or creating a new XR app from scratch. This library provides subspace and spatial composables: such as spatial panels and orbiters, which let you place your existing 2D Compose or Views-based UI in a spatial layout. It introduces the Volume subspace composable, which allows you to place SceneCore entities, such as 3D models, relative to your UI. Learn more in this developer guide:

    • Subspace: This composable can be placed anywhere within your app’s UI hierarchy, allowing you to maintain layouts for 2D and spatial UI without losing context between files. This makes it easier to share things like existing app architecture between XR and other form factors without needing to hoist state through your whole UI tree or re-architect your app.

    • SpatialPanel: A spatial panel is a subspace composable that lets you display app content–for example, you could display video playback, still images, or any other content in a spatial panel.

    • Orbiter: An orbiter is a spatial UI component. It's designed to be attached to a corresponding spatial panel, and contains navigation and contextual action items related to that spatial panel. For example, if you've created a spatial panel to display video content, you could add video playback controls inside an orbiter.

    • Volume: Place SceneCore entities, such as 3D models, relative to your UI.

  • Spatial Layout: You can create multiple spatial panels and place them within a Spatial Layout using SpatialRow, SpatialColumn,

Read more

2024-12-11

11 Dec 18:48

Choose a tag to compare

Activity: v1.10.0-rc01

December 11, 2024

androidx.activity:activity:1.10.0-rc01, androidx.activity:activity-compose:1.10.0-rc01, and androidx.activity:activity-ktx:1.10.0-rc01 are released. Version 1.10.0-rc01 contains these commits.

Bug Fixes

  • Fixed an issue where changing the enabled state while the PredictiveBackHandler is currently active would short circuit the callback immediately. It will now finish the current callback regardless of the enabled status changes. (Ib8719)

AppSearch: v1.1.0-alpha07

December 11, 2024

androidx.appsearch:appsearch-*:1.1.0-alpha07 is released. Version 1.1.0-alpha07 contains these commits.

New Features

  • Add ExperimentalAppSearchApi annotation to new API surfaces that have not yet stabilized. (Ib09f4)
  • Support for efficiently storing and sharing binary blob data via AppSearchSession#openBlobForWriteAsync and related methods
  • Support for filtering query results by scoring expression via the matchScoreExpression function (Id525a)
  • Support for propagating deletion from parent document to child documents. (Ia032d)
  • Support for embedding quantization API to increase embedding performance with slight quality loss. (Id8a07)
  • Support for restricting searches to certain documents using the addFilterDocumentIds API in SearchSpec. (I7c6f1)

API Changes

  • Move parent type information from GenericDocument to SearchResult. (I34a1d)
  • Support for new action types in the TakenAction API, including DismissAction and ImpressionAction. (I0c6c7)
  • Added new AppSearch builtin schema WebPage. (I28127)

Benchmark: v1.4.0-alpha06

December 11, 2024

androidx.benchmark:benchmark-*:1.4.0-alpha06 is released. Version 1.4.0-alpha06 contains these commits.

API Changes

  • Removed usage of @Language("sql") in PerfettoTraceProcessor.Session.query(), as Studio highlighting/parsing is broken. (Idc2fa, b/377733398)

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 (I46810, b/326456246)
  • Corrected ArtMetric to report class load (not init), and improved docs to clarify runtime behavior. (I9915c)
  • On Android Multiuser, execute commands as root only on rooted devices. (I88b44)

Camera: v1.4.1

December 11, 2024

androidx.camera:camera-*:1.4.1 is released. Version 1.4.1 contains these commits.

Bug Fixes

  • Fixed an issue on Pixel Android 15 devices where NIGHT mode in Extensions failed to capture still images until the camera focused on a nearby object. (I228d4)
  • Fixed the ImageCapture#takePicture malfunction issue when extensions are enabled and VideoCapture is bound together. (I5c745)

Camera: v1.5.0-alpha04

December 11, 2024

androidx.camera:camera-*:1.5.0-alpha04 is released. Version 1.5.0-alpha04 contains these commits.

API Changes

  • Exposed ImageCapture.Builder#setOutputFormat and ImageCaptureCapabilities#getSupportedOutputFormats as stable APIs (Ieb04a)
  • Add VideoCapture.getResolutionInfo() to get the resolution information when a VideoCapture is bound to a Lifecycle. (Icb478)
  • Exposed PreviewView.getScreenFlash and PreviewView.setScreenFlashOverlayColor as stable APIs. (I74fee)

Bug Fixes

  • Fixed capture failure issue on Vivo 1610 device while taking picture with flash in the dark. (I366f4)
  • Fixed torch unexpectedly turning off after image capture in Redmi Note 6 Pro. (I2e0e8, b/377144569)
  • Fixed an issue on Pixel Android 15 devices where NIGHT mode in Extensions failed to capture still images until the camera focused on a nearby object. (I228d4)
  • Fixed the still image capture malfunction issue when extensions are enabled and VideoCapture is bound together. (I5c745)
  • Enabled UltraHDR still image capture support for Extensions if the device can support it. (I48300)
  • Fixed flash timing issue for flash capture with CameraEffect targeting image captures on TCL devices. (I7698c)

camera media3: v1.0.0-alpha01

December 11, 2024

androidx.camera.media3:media3-effect:1.0.0-alpha01 is released. Version 1.0.0-alpha01 contains these commits.

New Features

  • An adapter library for using Media3 effects with CameraX. It's for adding Media3 effects into the camera pipeline with CameraX's ...
Read more

2024-12-09

09 Dec 18:47

Choose a tag to compare

Media3: v1.5.0

November 27, 2024

androidx.media3:media3-*:1.5.0 is released. Version 1.5.0 contains these commits.

  • Common Library:
    • Add ForwardingSimpleBasePlayer that allows forwarding to another player with small adjustments while ensuring full consistency and listener handling (#1183).
    • Replace SimpleBasePlayer.State.playlist by getPlaylist() method.
    • Add override for SimpleBasePlayer.State.Builder.setPlaylist() to directly specify a Timeline and current Tracks and Metadata instead of building a playlist structure.
    • Increase minSdk to 21 (Android Lollipop). This is aligned with all other AndroidX libraries.
    • Add androidx.media3:media3-common-ktx artifact which provides Kotlin-specific functionality built on top of the Common library
    • Add Player.listen suspending extension function to spin a coroutine to listen to Player.Events to the media3-common-ktx library.
    • Remove @DoNotInline annotations from manually out-of-lined inner classes designed to avoid runtime class verification failures. Recent versions of R8 now automatically out-of-line calls like these to avoid the runtime failures (so the manual out-of-lining is no longer required). All Gradle users of the library must already be a using a version of the Android Gradle Plugin that uses a version of R8 which does this, due to compileSdk = 35. Users of the library with non-Gradle build systems will need to ensure their R8-equivalent shrinking/obfuscating step does a similar automatic out-of-lining process in order to avoid runtime class verification failures. This change has already been done in other AndroidX libraries.
  • ExoPlayer:
    • MediaCodecRenderer.onProcessedStreamChange() can now be called for every media item. Previously it was not called for the first one. Use MediaCodecRenderer.experimentalEnableProcessedStreamChangedAtStart() to enable this.
    • Add PreloadMediaSource.PreloadControl.onPreloadError to allow PreloadMediaSource.PreloadControl implementations to take actions when error occurs.
    • Add BasePreloadManager.Listener to propagate preload events to apps.
    • Allow changing SNTP client timeout and retry alternative addresses on timeout (#1540).
    • Remove MediaCodecAdapter.Configuration.flags as the field was always zero.
    • Allow the user to select the built-in speaker for playback on Wear OS API 35+ (where the device advertises support for this).
    • Defer the blocking call to Context.getSystemService(Context.AUDIO_SERVICE) until audio focus handling is enabled. This ensures the blocking call isn't done if audio focus handling is not enabled (#1616).
    • Allow playback regardless of buffered duration when loading fails (#1571).
    • Add AnalyticsListener.onRendererReadyChanged() to signal when individual renderers allow playback to be ready.
    • Fix MediaCodec.CryptoException sometimes being reported as an "unexpected runtime error" when MediaCodec is operated in asynchronous mode (default behaviour on API 31+).
    • Pass bufferedDurationUs instead of bufferedPositionUs with PreloadMediaSource.PreloadControl.onContinueLoadingRequested(). Also changes DefaultPreloadManager.Status.STAGE_LOADED_TO_POSITION_MS to DefaultPreloadManager.Status.STAGE_LOADED_FOR_DURATION_MS, apps then need to pass a value representing a specific duration from the default start position for which the corresponding media source has to be preloaded with this IntDef, instead of a position.
    • Add ForwardingRenderer implementation that forwards all method calls to another renderer (1703).
    • Add playlist preloading for the next item in the playlist. Apps can enable preloading by calling ExoPlayer.setPreloadConfiguration(PreloadConfiguration) accordingly. By default preloading is disabled. When opted-in and to not interfere with playback, DefaultLoadControl restricts preloading to start and continue only when the player is not loading for playback. Apps can change this behaviour by implementing LoadControl.shouldContinuePreloading() accordingly (like when overriding this method in DefaultLoadControl). The default implementation of LoadControl disables preloading in case an app is using a custom implementation of LoadControl.
    • Add method MediaSourceEventListener.EventDispatcher.dispatchEvent() to allow invoking events of subclass listeners (1736).
    • Add DefaultPreloadManager.Builder that builds the DefaultPreloadManager and ExoPlayer instances with consistently shared configurations.
    • Remove Renderer[] parameter from LoadControl.onTracksSelected() as DefaultLoadControl implementation can retrieve the stream types from ExoTrackSelection[].
    • Deprecated DefaultLoadControl.calculateTargetBufferBytes(Renderer[], ExoTrackSelection[]) and marked method as final to prevent overrides. The new DefaultLoadControl.calculateTargetBufferBytes(ExoTrackSelection[]) should be used instead.
    • Report MediaSourceEventListener events from secondary sources in MergingMediaSource. This will result in load start/error/cancelled/completed events being reported for sideloaded subtitles (those added with MediaItem.LocalConfiguration.subtitleConfigurations), which may appear as duplicate load events emitted from AnalyticsListener.
    • Prevent subtitle & metadata errors from completely stopping playback. Instead the problematic track is disabled and playback of the remaining tracks continues (#1722).
      • In new subtitle handling (during extraction), associated parse (e.g. invalid subtitle data) and load errors (e.g. HTTP 404) are emitted via onLoadError callbacks.
      • In legacy subtitle handling (during rendering), only associated load errors are emitted via onLoadError callbacks while parse errors are silently ignored (this is pre-existing behaviour).
    • Fix bug where playlist items or periods in multi-period DASH streams with durations that don't match the actual content could cause frame freezes at the end of the item (#1698).
    • Add a setter to SntpClient to set the max elapsed time since the last update after which the client is re-initialized (#1794).
  • Transformer:
    • Add SurfaceAssetLoader, which supports queueing video data to Transformer via a Surface.
    • ImageAssetLoader reports unsupported input via AssetLoader.onError instead of throwing an IllegalStateException.
    • Make setting the image duration using MediaItem.Builder.setImageDurationMs mandatory for image export.
    • Add export support for gaps...
Read more

2024-11-25

28 Nov 06:48

Choose a tag to compare

Media3: v1.5.0

November 27, 2024

androidx.media3:media3-*:1.5.0 is released. Version 1.5.0 contains these commits.

  • Common Library:
    • Add ForwardingSimpleBasePlayer that allows forwarding to another player with small adjustments while ensuring full consistency and listener handling (#1183).
    • Replace SimpleBasePlayer.State.playlist by getPlaylist() method.
    • Add override for SimpleBasePlayer.State.Builder.setPlaylist() to directly specify a Timeline and current Tracks and Metadata instead of building a playlist structure.
    • Increase minSdk to 21 (Android Lollipop). This is aligned with all other AndroidX libraries.
    • Add androidx.media3:media3-common-ktx artifact which provides Kotlin-specific functionality built on top of the Common library
    • Add Player.listen suspending extension function to spin a coroutine to listen to Player.Events to the media3-common-ktx library.
    • Remove @DoNotInline annotations from manually out-of-lined inner classes designed to avoid runtime class verification failures. Recent versions of R8 now automatically out-of-line calls like these to avoid the runtime failures (so the manual out-of-lining is no longer required). All Gradle users of the library must already be a using a version of the Android Gradle Plugin that uses a version of R8 which does this, due to compileSdk = 35. Users of the library with non-Gradle build systems will need to ensure their R8-equivalent shrinking/obfuscating step does a similar automatic out-of-lining process in order to avoid runtime class verification failures. This change has already been done in other AndroidX libraries.
  • ExoPlayer:
    • MediaCodecRenderer.onProcessedStreamChange() can now be called for every media item. Previously it was not called for the first one. Use MediaCodecRenderer.experimentalEnableProcessedStreamChangedAtStart() to enable this.
    • Add PreloadMediaSource.PreloadControl.onPreloadError to allow PreloadMediaSource.PreloadControl implementations to take actions when error occurs.
    • Add BasePreloadManager.Listener to propagate preload events to apps.
    • Allow changing SNTP client timeout and retry alternative addresses on timeout (#1540).
    • Remove MediaCodecAdapter.Configuration.flags as the field was always zero.
    • Allow the user to select the built-in speaker for playback on Wear OS API 35+ (where the device advertises support for this).
    • Defer the blocking call to Context.getSystemService(Context.AUDIO_SERVICE) until audio focus handling is enabled. This ensures the blocking call isn't done if audio focus handling is not enabled (#1616).
    • Allow playback regardless of buffered duration when loading fails (#1571).
    • Add AnalyticsListener.onRendererReadyChanged() to signal when individual renderers allow playback to be ready.
    • Fix MediaCodec.CryptoException sometimes being reported as an "unexpected runtime error" when MediaCodec is operated in asynchronous mode (default behaviour on API 31+).
    • Pass bufferedDurationUs instead of bufferedPositionUs with PreloadMediaSource.PreloadControl.onContinueLoadingRequested(). Also changes DefaultPreloadManager.Status.STAGE_LOADED_TO_POSITION_MS to DefaultPreloadManager.Status.STAGE_LOADED_FOR_DURATION_MS, apps then need to pass a value representing a specific duration from the default start position for which the corresponding media source has to be preloaded with this IntDef, instead of a position.
    • Add ForwardingRenderer implementation that forwards all method calls to another renderer (1703).
    • Add playlist preloading for the next item in the playlist. Apps can enable preloading by calling ExoPlayer.setPreloadConfiguration(PreloadConfiguration) accordingly. By default preloading is disabled. When opted-in and to not interfere with playback, DefaultLoadControl restricts preloading to start and continue only when the player is not loading for playback. Apps can change this behaviour by implementing LoadControl.shouldContinuePreloading() accordingly (like when overriding this method in DefaultLoadControl). The default implementation of LoadControl disables preloading in case an app is using a custom implementation of LoadControl.
    • Add method MediaSourceEventListener.EventDispatcher.dispatchEvent() to allow invoking events of subclass listeners (1736).
    • Add DefaultPreloadManager.Builder that builds the DefaultPreloadManager and ExoPlayer instances with consistently shared configurations.
    • Remove Renderer[] parameter from LoadControl.onTracksSelected() as DefaultLoadControl implementation can retrieve the stream types from ExoTrackSelection[].
    • Deprecated DefaultLoadControl.calculateTargetBufferBytes(Renderer[], ExoTrackSelection[]) and marked method as final to prevent overrides. The new DefaultLoadControl.calculateTargetBufferBytes(ExoTrackSelection[]) should be used instead.
    • Report MediaSourceEventListener events from secondary sources in MergingMediaSource. This will result in load start/error/cancelled/completed events being reported for sideloaded subtitles (those added with MediaItem.LocalConfiguration.subtitleConfigurations), which may appear as duplicate load events emitted from AnalyticsListener.
    • Prevent subtitle & metadata errors from completely stopping playback. Instead the problematic track is disabled and playback of the remaining tracks continues (#1722).
      • In new subtitle handling (during extraction), associated parse (e.g. invalid subtitle data) and load errors (e.g. HTTP 404) are emitted via onLoadError callbacks.
      • In legacy subtitle handling (during rendering), only associated load errors are emitted via onLoadError callbacks while parse errors are silently ignored (this is pre-existing behaviour).
    • Fix bug where playlist items or periods in multi-period DASH streams with durations that don't match the actual content could cause frame freezes at the end of the item (#1698).
    • Add a setter to SntpClient to set the max elapsed time since the last update after which the client is re-initialized (#1794).
  • Transformer:
    • Add SurfaceAssetLoader, which supports queueing video data to Transformer via a Surface.
    • ImageAssetLoader reports unsupported input via AssetLoader.onError instead of throwing an IllegalStateException.
    • Make setting the image duration using MediaItem.Builder.setImageDurationMs mandatory for image export.
    • Add export support for gaps...
Read more

2024-11-19

19 Nov 18:46

Choose a tag to compare

Media3: 1.5.0-rc02 (2024-11-19)

androidx.media3:media3-*:1.5.0-rc02 is released.

Version 1.5.0-rc02 contains these commits.

This release includes the following changes since the 1.5.0-rc01 release:

  • Extractors:
    • Add AC-4 Level-4 ISO base media file format support (#1265).
  • Text:
    • Fix garbled CEA-608 subtitles in content with more than one SEI message per sample.
    • Fix playback hanging on DASH multi-period streams when CEA-608 subtitles are enabled (#1863).
    • Fix garbled CEA-608 subtitles in MP4 files that incorrectly mark every sample as a sync sample (#1863).
  • Demo app
    • Resolve the memory leaks in demo short-form app (#1839).

2024-11-13

13 Nov 18:44

Choose a tag to compare

Activity: v1.10.0-beta01

November 13, 2024

androidx.activity:activity:1.10.0-beta01, androidx.activity:activity-compose:1.10.0-beta01, and androidx.activity:activity-ktx:1.10.0-beta01 are released with no changes since the last alpha. Version 1.10.0-beta01 contains these commits.

Benchmark: v1.4.0-alpha05

November 13, 2024

androidx.benchmark:benchmark-*:1.4.0-alpha05 is released. Version 1.4.0-alpha05 contains these commits.

Bug Fixes

  • Fixed an issue on API 34+ where CompilationMode.None() would have inconsistent performance not representative of initial, worst case performance. This works around a platform change which allows ART's compilation state verify to partially compile apps (only affecting class loading) shortly after first launch. (Ie48d0)
  • Fixed issue where (especially short) traces could be captured that wouldn't report measurement from built-in Macrobenchmark Metrics, due to the process name being truncated within the Perfetto trace. Now macrobenchmark works around this issue by looking for the truncated package name in all built-in queries, in addition to the expected package name. Note that custom TraceMetric implementations or other direct callers of PerfettoSession.query can implement this same behavior by changing process.name LIKE "$packageName" in a Perfetto query to instead be (process.name LIKE "$packageName" OR process.name LIKE "$(packageName.takeLast(15))"). (I5bf01, b/377565760)

Car App: v1.7.0-beta03

November 13, 2024

Fixed a security vulnerability and other general bug fixes. If you are using a lower version, please update to use this version.

androidx.car.app:app-*:1.7.0-beta03 is released. Version 1.7.0-beta03 contains these commits.

API Changes

  • Update CAL Serialization / De-serialization code to only handle objects which have the annotation @CarProtocol declared on them. (Ic730e)
  • CarAppExtender can now be used to extend the framework Notification.Builder instead of only NotificationCompat.Builder. (Id3ad7)
  • Add KEY_EXCLUDE_MEDIA_ITEM_FROM_MIXED_APP_LIST extra. (I201f9)
  • Deprecate the empty Builder constructor on ConversationItem and replace it with a constructor that takes required parameters. Also adds a check to guard against null messages. (Ic8221)

Bug Fixes

  • Ensure PlaceList map uses string (Text-only) Header title. (Ic992f)
  • 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. (Ib5367, b/326456246)

Collection: v1.5.0-alpha06

November 13, 2024

androidx.collection:collection-*:1.5.0-alpha06 is released. Version 1.5.0-alpha06 contains these commits.

Bug Fixes

  • Fixed a crash that could occur in SieveCache and OrderedScatterSet when adding numerous items causing repeated key collisions. (Iaaf3d, b/375607736)
  • Add wasm target to collection library. (I66fe3, b/352722444)

Compose Animation: v1.8.0-alpha06

November 13, 2024

androidx.compose.animation:animation-*:1.8.0-alpha06 is released. Version 1.8.0-alpha06 contains these commits.

API Changes

  • Updated sharedElement parameter naming from state to sharedContentState for consistency across shared element APIs. (I5694c, b/375351468)
  • AnimatedImageVector suite of APIs are now stable. (I7174b, b/261436267)

Compose Foundation: v1.8.0-alpha06

November 13, 2024

androidx.compose.foundation:foundation-*:1.8.0-alpha06 is released. Version 1.8.0-alpha06 contains these commits.

API Changes

  • Adds stylusHoverIcon modifier. (Iff20a, b/331289114)
  • Deprecated AnchoredDraggableState's confirmValueChange. Instead of vetoing state changes, disallowed anchors should not be in the active anchor set, and an OverscrollEffect should be used to indicate the unavailability of the requested action. (Ia717f)
  • Changes Autofill manager to be an interface. (I84914, b/376080755)
  • Adds OverscrollEffect#withoutDrawing and OverscrollEffect#withoutEventHandling APIs - these APIs create a wrapped instance of the provided overscroll effect that doesn't draw / handle events respectively, which allows for rendering overscroll in a separate component from the component that is dispatching events. For example, disabling drawing the overscroll inside a lazy list, and then drawing the overscroll separately on top / elsewhere. (Idbb3d, b/266550551, b/204650733, b/255554340, b/229537244)
  • Adding autofill support in text toolbar. (Ie6a4c)
  • Deprecates OverscrollConfiguration and LocalOverscrollConfigurati...
Read more

2024-10-30@07PM

31 Oct 13:00

Choose a tag to compare

Activity: v1.10.0-alpha03

October 30, 2024

androidx.activity:activity:1.10.0-alpha03, androidx.activity:activity-compose:1.10.0-alpha03, and androidx.activity:activity-ktx:1.10.0-alpha03 are released. Version 1.10.0-alpha03 contains these commits.

API Changes

  • Added a new LocalActivity composition local that provides the Activity for the current scope, removing the need for developers to get an Activity from the LocalContext. It also comes with a new lint rule that checks when the LocalContext is incorrectly being cast to an Activity. (I7746a, b/283009666)

Bug Fixes

  • From Activity 1.9.3: PredictiveBackHandler will no longer fire it's callback after the handler has been disabled. This will fix an issue where the NavHost from Navigation Compose would throw an IndexOutOfBoundsException. (I3f75e, b/365027664, b/340202286)

Dependency Update

Annotation: v1.9.1

October 30, 2024

androidx.annotation:annotation-*:1.9.1 is released. Version 1.9.1 contains these commits.

Bug Fixes

  • Added JS target platform. (I2310b)
  • Kotlin version update to 1.9 (I1a14c)

Benchmark: v1.4.0-alpha04

October 30, 2024

androidx.benchmark:benchmark-*:1.4.0-alpha04 is released. Version 1.4.0-alpha04 contains these commits.

New Features

  • (Experimental) Enable Baseline Profile generation, and benchmarking on apps installed to a secondary user, for example any app on headless Android Auto devices. This support has been tested in some scenarios, but let us know with a bug if it doesn't work for you. (I9fcbe, b/356684617, b/373641155)

Bug Fixes

  • isProfileable is now always overridden in benchmark builds, and isDebuggable is also now always overridden in both benchmark and nonMinified (baseline profile capture) builds. (I487fa, b/369213505)
  • Fixes compilation detection on some physical devices prior to API 28 - affects json context.compilationMode, as well as behavior of androidx.benchmark.requireAot=true (which no longer incorrectly throws) (Ic3e08, b/374362482)
  • In CpuEventCounter metrics, throw if invalid measurements are observed (e.g. instructions/cpucycles==0) (I8c503)

Camera: v1.4.0

October 30, 2024

androidx.camera:camera-*:1.4.0 is released. Version 1.4.0 contains these commits.

Important changes since 1.3.0

CameraX 1.4.0 is packed with exciting updates! Here's a summary:

Headline Feature: 10-bit HDR:

  • Capture stunning HDR photos and videos with ease.
  • Supports HLG and 10-bit HEVC encoding.
  • Enjoy 10-bit HDR preview and query device capabilities.
  • Works with UltraHDR images and HDR video on a growing range of devices.

Other Cool Features:

  • Kotlin Extensions: Added takePicture and awaitInstance suspend functions.
  • Real-time Effects: Apply effects like watermarks and object highlighting.
  • CameraController API: New controls for video capture configuration.
  • Preview Stabilization: Query device capability and enable stabilization.
  • VideoCapture Enhancements: Finer control over quality and access to higher resolutions.
  • CameraX Extensions Integration: Seamless integration with VideoCapture and new ImageCapture features.
  • Shutter Sound API: Easily check regional shutter sound requirements.
  • Screen Flash: Improved low-light photos for front-facing cameras.
  • Camera Extensions Metadata APIs: Supporting APIs for adjusting extensions strength and get notification of current Extensions mode in ExtensionMode#AUTO. You can find more bug fixes in our Beta and RC announcements.

Camera: v1.5.0-alpha03

October 30, 2024

androidx.camera:camera-*:1.5.0-alpha03 is released. Version 1.5.0-alpha03 contains these commits.

API Changes

  • Add output format APIs for RAW and RAW + JPEG ImageCapture, the device capability check is exposed in ImageCaptureCapabilities#getSupportedOutputFormats. The OUTPUT_FORMAT_RAW is to capture RAW image, which is Adobe DNG format and OUTPUT_FORMAT_RAW_JPEG is to simultaneously capture RAW and JPEG images. The new ImageCapture#takePicture API is used for simultaneous image capture, it needs to provide two OutputFileOptions, the first one is for RAW image and the second one is for JPEG image. (Ib0f3d)

Bug Fixes

  • Fixed preview and video under-exposure issue on TCL devices when VideoCapture is enabled. (Id7a64)
  • Fixed the issue where invoking startFocusMetering with PreviewView.getMeteringPointFactory doesn't get the correct sensor coordinates when an effect is enabled or when 4 use cases are bound (stream-sharing). (I916c5, b/345993685)
  • Fixed the VideoRecordEvent.Finalize.ERROR_INSUFFICIENT_STORAGE event is not triggered when recording a video and there is insufficient storage space available. (I35779, b/356399842)

camera viewfinder: v1.4.0-alpha10

October 30, 2024

Read more