What’s New

CameraX

Frameworks & LibrariesAI extracted

AndroidX's camera library — a lifecycle-aware API over camera2, plus the Viewfinder artifacts.

Latest 1.7.0-alpha02 · by GoogleWebsite

Changelog

1.7.0-alpha02

Version 1.7

Added 20
  • CameraXViewfinder now supports built-in gestures for pinch-to-zoom and tap-to-focus
  • CameraXViewfinder adds support for screen flash and stream state
  • FocusState is now public in viewfinder-core to allow monitoring tap-to-focus results
  • Added isAutoRotationEnabled to SessionConfig.Builder, HighSpeedVideoSessionConfig.Builder, and ExtensionSessionConfig.Builder with Kotlin DSL factory functions
  • Added TransformationMode property to TransformationInfo to support apps to use OpenGL pipeline in EMBEDDED mode
  • Added isNightModeIndicatorSupported() and getNightModeIndicator() to CameraInfo to determine when environment conditions meet criteria for Night Mode
Changed 1
  • Updated Compose compileSdk to API 37, requiring minimum AGP version of 9.2.0 when using Compose
Fixed 2
  • Fixed CameraXViewfinder transformation issues in EMBEDDED mode when OpenGL pipeline is enabled
  • Fixed compilation error Cannot access class 'ListenableFuture'
Removed 1
  • Remove requirement for compileSdk 37
Deprecated 1
  • ExtensionsManager#getExtensionEnabledCameraSelector is now deprecated, use ExtensionSessionConfig API instead

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. 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. Added TransformationMode property to TransformationInfo to support apps to use OpenGL pipeline in EMBEDDED mode. Added isNightModeIndicatorSupported() and getNightModeIndicator() to CameraInfo to determine when the environment conditions meet the criteria for Night Mode. Exposed ImageAnalysis.OUTPUT_IMAGE_FORMAT_PRIVATE and ImageProxy.getHardwareBuffer() as public API to support GPU based ImageAnalysis. ExtensionsManager#getExtensionEnabledCameraSelector is now deprecated. Please use the new ExtensionSessionConfig API for enabling extension modes. 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 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. 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. Added support for QHD video quality in VideoCapture. Added Recorder.Builder.setTargetAudioChannelCount(int) and Recorder.getTargetAudioChannelCount() to allow developers to set an explicit audio channel count. Added Recorder.Builder.setTargetAudioEncodingBitRate(int) to allow setting a target audio encoding bitrate. 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. 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. Added CameraController.setAutoRotationEnabled(boolean) to allow disabling the automatic device rotation listener. 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. Remove requirement for compileSdk 37 Fixed CameraXViewfinder transformation issues in EMBEDDED mode when OpenGL pipeline is enabled by CameraX for binding more UseCases or surface processing. Updated tests and activities to use ExtensionSessionConfig instead of the deprecated getExtensionEnabledCameraSelector API. Fixed a compilation error "Cannot access class 'ListenableFuture'". Updated Compose compileSdk to API 37. This means that a minimum AGP version of 9.2.0 is required when using Compose.

1.6.1

Camera Version 1.6

Fixed a compilation error "Cannot access class ListenableFuture" when using CameraX 1.6.0.

1.6.0

Camera Version 1.6

Migrated to a High-Performance, Unified Camera Stack CameraX now uses CameraPipe—the same modern, high-performance stack powering the Pixel camera. This transition streamlines architectural efficiency and provides a scalable foundation for bringing advanced computational photography features to the developer ecosystem. Media3 Muxer Integration CameraX now integrates the Media3 Muxer by default within the VideoCapture API. This migration provides several benefits: Enhanced Performance: More efficient video processing and muxing.

1.7.0-alpha01

Version 1.7

Exposed the CameraController.setSessionConfig() API. This allows providing a custom SessionConfig for advanced UseCase configurations not directly exposed by CameraController. When a SessionConfig is active, other configuration methods on CameraController are disabled. Moves libraries to use Java 11 target. This means produced bytecode will be Java 11 (class file version 55) and might require desugaring to use the library Fixed a bug in ImageAnalysis where images were not correctly rotated when output image rotation is enabled and the initial relative rotation is 0 degrees.

1.6.0-beta02

Version 1.6.0-beta02

Fixed ImageCapture OUTPUT_FORMAT_RAW_JPEG in-memory capture IllegalArgumentException issue. Migrated to AndroidX Media3 muxer. This fixed 1: video corruption during unexpected interruptions or app termination and 2: crashes when saving videos to proxy file descriptors.

1.6.0-beta01

Version 1.6.0-beta01

Fixed CameraExtensionsInfo current type issue in CameraX 1.6.0-alpha that the LiveData object can't receive the updated type data. Updated the ExifInterface dependency to include a fix for parsing JPEGs with 0xFF padding, which resolves image capture failures on devices where the JPEG encoder adds fill bytes before markers.

1.5.3

Version 1.5.3

Updated the ExifInterface dependency to 1.4.2. This fixes an image capture failure that occurs on devices producing JPEGs with additional (and permitted) 0xFF bytes before a marker.

1.6.0-alpha02

Version 1.6.0-alpha02

Added a groupable feature to denote the video stabilization feature in a session config. Developers can now request video stabilization as a required or preferred feature, aligning it with other groupable features like UHD_RECORDING, PREVIEW_STABILIZATION. Added groupable features to denote the video recording quality in a session config. Developers can now request a specific quality (e.g., UHD, FHD) as a required or preferred feature, aligning it with other groupable features like HDR and 60 FPS. Added support for using both the CameraEffect and the feature groups API in SessionConfig. Added support for using both the ImageAnalysis and the feature groups API in SessionConfig. Added addUseCase setter function for ExtensionSessionConfig.Builder and added the lacking getters for ExtensionSessionConfig. Added ExtensionsManager.getInstance API which is a suspending version of ExtensionsManager.getInstanceAsync Renamed isFeatureGroupSupported to isSessionConfigSupported, and make it support any types of SessionConfig. Converted ExtensionsManager into Kotlin implementation. Added CameraProvider#getCameraInfo(CameraSelector, SessionConfig) to retrieve CameraInfo when the SessionConfig can affect camera selection. For example, when using an ExtensionSessionConfig. Exposed ExtensionSessionConfig API. Apps can create an ExtensionSessionConfig and use it to create an extensions session now. The androidx.camera.video.HighSpeedVideoSessionConfig API is no longer experimental and is now a fully stable public API. The androidx.camera.core.SessionConfig API is no longer experimental and is now a fully stable public API. Fixed a crash due to an IllegalArgumentException: Dynamic range profile cannot be converted to a DynamicRange object: on Android 17 or higher. Excluded problematic YUV format output sizes from Samsung Z Fold 4 device. The received images have distortion issue when using those output sizes. Fixed CaptureRequest.FLASH_MODE not being applied when set through the Camera2Interop API. Fixed a device-specific issue on Samsung A53 where image capture with torch enabled would fail sometimes if VideoCapture use case is bound. Fixes an issue on some devices where using the flash with the ultra-wide camera may result in underexposed images.

1.5.2

Version 1.5.2

Fixed a crash due to an IllegalArgumentException: Dynamic range profile cannot be converted to a DynamicRange object: on Android 17 or higher. Fixed a bug leading to inconsistent feature group API results when PREVIEW_STABILIZATION feature was added with VideoCapture use case, but without Preview use case. Fixed preferred features not being filtered out despite lacking the required use cases for the features to be supported.

1.6.0-alpha01

Version 1.6.0-alpha01

CameraX has migrated to a unified, high-performance camera stack, which is also used by the Pixel camera app. Known as CameraPipe, this new stack is a collaboration between the CameraX and Pixel Camera teams. It ensures that all improvements are shared, benefiting both CameraX users and the Pixel camera app. Added new APIs for dynamic camera add/removal detection. See the CameraPresenceListener API for more details. The feature group API now provides consistent results when PREVIEW_STABILIZATION is used with VideoCapture. This corrects a bug that caused inconsistent results when a Preview use case was not also active. Fixed an issue where unsupported preferred features were incorrectly made available. Features are now correctly filtered when their required use cases are not met. Fixed glitchy video result on Samsung Galaxy S6. Fixed an issue where CameraInfo#isFeatureGroupSupported could incorrectly return true for PREVIEW_STABILIZATION if the SessionConfig in the query was already configured with other features.

1.5.1

Version 1.5.1

Support CameraEffect in concurrent camera composition mode. The effect will be applied on the composition output. Please note that mirrorMode in VideoCapture will be ignored when effect is set in concurrent camera composition mode. Fixed the issue where mirrorMode is not applied correctly to the secondary camera in concurrent camera composition mode. Support binding Preview, ImageCapture and VideoCapture together in concurrent camera non-composition mode. Fixed an issue where UseCases such as ImageCapture and VideoCapture would lose their target rotation information if they were recreated. This could cause images or videos to have an incorrect orientation if a setting like imageCaptureMode was changed after the device had been rotated. Fixed an issue that prevented Preview from selecting 16:9 resolutions and VideoCapture from recording at QUALITY_1080P. This problem occurred when using a default Preview resolution configuration while the internal StreamSharing feature was active (e.g., when four UseCases are bound simultaneously). Fixed the crash when effect is being activated after SurfaceProcessor is shut down

1.5.0

Version 1.5.0

High-speed and Slow-motion Recording: Easily integrate high-speed (120/240 fps) and slow-motion video recording with minimal code. Refer to Recorder#getHighSpeedVideoCapabilities(CameraInfo) and HighSpeedVideoSessionConfig for details. SessionConfig and FeatureGroup API: The new SessionConfig API allows you to configure the camera session and enable multiple features together safely, including HLG (HDR), UltraHDR, 60 FPS, and Preview stabilization. You can also set a preferable feature group with priority, letting CameraX determine the optimal supported combination. See SessionConfig.Builder#setPreferredFeatureGroup, SessionConfig.Builder#setRequiredFeatureGroup, and CameraInfo#isFeatureGroupSupported(SessionConfig) for more information. Deterministic Frame Rate API: Address previous limitations with setTargetFrameRate by using CameraInfo.getSupportedFrameRateRanges(sessionConfig) to query and SessionConfig.setExpectedFrameRateRange to set precise and supported frame rates. Camera Extensions: UltraHDR format is now supported with Extensions. Check ImageCapture.getImageCaptureCapabilities(cameraInfo).getSupportedOutputFormats() and enable it in ImageCapture.Builder.setOutputFormat. Zoom ratio and preview stabilization capabilities are now reflected when Extensions are enabled. Torch Strength: Adjust torch strength using CameraControl.setTorchStrengthLevel. Low Light Boost Mode: You can enable the low light boost mode( CONTROL_AE_MODE_ON_LOW_LIGHT_BOOST_BRIGHTNESS_PRIORITY) by the following APIs: Refer to CameraInfo#isLowLightBoostSupported, CameraInfo#getLowLightBoostState, and CameraControl#enableLowLightBoostAsync. Video Capture: VideoRecordEvent.Finalize.ERROR_INSUFFICIENT_STORAGE is now triggered for insufficient storage during recording. PendingRecording.withAudioEnabled(boolean initialMuted) allows controlling the initial mute state for audio recording. Image Capture: Support for DNG (RAW) and JPEG + DNG (RAW) formats in ImageCapture. Check ImageCaptureCapabilities(CameraInfo).getSupportedOutputFormats() for RAW support. Use overloaded takePicture APIs with multiple OutputFileOptions for RAW+DNG capture. Image Analysis: Support for NV21 format in ImageAnalysis. Enable it with ImageAnalysis.Builder.setOutputImageFormat(OUTPUT_IMAGE_FORMAT_NV21).

1.5.0-rc01

Version 1.5.0-rc01

Moving the default minSdk from API 21 to API 23 Removed the 10-bit output restriction for the low-light boost auto-exposure mode. Applications can now simultaneously enable both features on supported devices. Resolved an issue that caused devices with UniSoc chipsets to hang when capturing an image. The problem occurred when VideoCapture, Preview, and ImageCapture were used simultaneously with all streams set to a 1280x720 resolution. Fixed preview black screen when no high-speed frame rate is set for high-speed/slow-motion recording. Improve error handling and logging in getViewportAspectRatioInt

1.5.0-beta02

Version 1.5.0-beta02

Added new APIs to set or query groups of high-quality features more intuitively and accurately as these features may not be supported as a combination across all devices. SessionConfig now contains new APIs to denote a group of features as either required or preferred. The CameraInfo.isFeatureGroupSupported API allows to know if a feature group is supported before binding a SessionConfig. SessionConfig also allows setting a listener to know which features are finally selected when a session config is bound. Added new API SessoinConfig.Builder.setFrameRateRange(Range) and CameraInfo.getSupportedFrameRateRanges(SessionConfig), enabling developers to query guaranteed supported frame rates constrained by a specific SessionConfig and then apply the frame rate on SessionConfig. Introduced the new SessionConfig API, which includes a better abstraction for configuring use cases, session parameters, CameraEffect, ViewPort and etc. Binding a SessionConfig to a LifecycleOwner opens the camera session, configures it using the specified use cases and session parameters, and applies the designated CameraEffect and ViewPort. When updating a new SessionConfig to the same LifecycleOwner, you can just bind a new Sessionconfig without the need of invoking unbind or unbindAll first. Added new APIs to record high-speed/slow-motion video. See HighSpeedVideoSessionConfig API for more details. Fixed ImageCaptureCapabilities#getSupportedOutputFormats() API reporting RAW formats as supported in some devices which doesn't actually have RAW capability. Fixed the memory leak that happens when PreviewView is used, CameraEffect is enabled or binding 4 use cases(StreamSharing) Fixed a video recording crash by AssertionError: Invalid internal audio state: IDLING. Fixed the issue when the app runs in an external display and the device is landscape, the preview in PreviewView becomes stretched or sideway Fixed the issue that Preview Stabilization settings are not correctly applied when the camera stream is sharing between Preview and VideoCapture. CameraXViewfinder now properly handles surface replacement in the underlying Viewfinder. This covers scenarios such as when an EXTERNAL viewfinder on API level 28 or lower moves off screen or if a CameraXViewfinder (with any ImplementationMode) is part of moveableContentOf(). In cases where the underlying ViewfinderSurfaceSession cannot be kept alive, the CameraXViewfinder will invalidate the current CameraX SurfaceRequest, allowing CameraX to use the new Surface. Fixes an issue on Android 10/11 where the EXTERNAL CameraXViewfinder could appear stretched or incorrect due to transformation operations (like scale or translate) being applied too early. The system now waits for the Surface to be created before applying these transformations in the layout phase, ensuring correct output. Composable CameraXViewfinder now works correctly with Compose's Pager. This change ensures that the Composable can be successfully reset by implementing the onReset callback of AndroidView, supporting both EMBEDDED and EXTERNAL implementations. Fixed a lifecycle owner leak that happens when unbinding use cases from a lifecycle owner without shutting down the camera provider.

1.5.0-beta01

Version 1.5.0-beta01

Projects released with Kotlin 2.0 require KGP 2.0.0 or newer to be consumed ContentScale and Alignment can now be used in the viewfinder to scale and place the displayed surface within its container, similar to how androidx.compose.foundation.Image behaves. TransformationInfo now has default values for all args. This will allow Viewfinders to be created without any TransformationInfo, which will default to a source rotation of 0, no source mirroring, and no crop rect. Added LifecycleCameraProvider, which is a camera provider that can be instantiated with different configurations for features such as accessing the camera of a virtual device by configuring with a customized context. Fixed preview freeze issue when using ImageAnalysis with another stream that uses TEMPLATE_RECORD on Samsung SM-E556B device. Fixed preview freeze issue when using ImageAnalysis with another stream that uses TEMPLATE_RECORD on Samsung SM-M556B device. Fixed Extensions NIGHT mode AssertError issue on Android 15 Pixel devices when doing zoom related operations. Fix ML Kit Analyzer incorrect bounding box coordinates issue when using CameraController.

1.4.2

Version 1.4.2

Fixed preview freeze issue when using ImageAnalysis with another stream that uses TEMPLATE_RECORD on Samsung Galaxy M55.

1.5.0-alpha06

Version 1.5.0-alpha06

Added CameraInfo.getTorchStrengthLevel, CameraInfo.getMaxTorchStrengthLevel and CameraControl.setTorchStrengthLevel to allow customizing the torch brightness A new API CameraController#setTapToFocusAutoCancelDuration has been added so that users can control the auto-cancellation behavior for PreviewView tap-to-focus events. By default, CameraX cancels the focus events after 5 seconds (i.e. camera focus is reset) and this API allows to modify that duration or disable auto-cancellation altogether. FLASH_STATE_READY has been renamed to NOT_FIRED and the other FlashState constant names are simplified for better readability.

1.5.0-alpha05

Version 1.5.0-alpha05

Add VideoCapture.getSelectedQuality() to know the selected Quality based on the QualitySelector. 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. Added OUTPUT_IMAGE_FORMAT_NV21 output format support for ImageAnalysis. Remove the experimental annotation of the featurecombinationquery artifact Adjust the zoom ratio range allowed for CameraControl by Extensions-specific characteristics when an extensions mode is enabled. Upgraded compileSdk as 35 for using Android 15 related API. Apps using CameraX libraries will also need to upgrade their compileSdk config setting. This library now uses JSpecify nullness annotations, which are type-use. Kotlin developers should use the following compiler argument to enforce correct usage: -Xjspecify-annotations=strict (this is the default starting with version 2.1.0 of the Kotlin compiler).

1.4.1

Version 1.4.1

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. Fixed the ImageCapture#takePicture malfunction issue when extensions are enabled and VideoCapture is bound together.

1.5.0-alpha04

Version 1.5.0-alpha04

Exposed ImageCapture.Builder#setOutputFormat and ImageCaptureCapabilities#getSupportedOutputFormats as stable APIs Add VideoCapture.getResolutionInfo() to get the resolution information when a VideoCapture is bound to a Lifecycle. Exposed PreviewView.getScreenFlash and PreviewView.setScreenFlashOverlayColor as stable APIs. Fixed capture failure issue on Vivo 1610 device while taking picture with flash in the dark. Fixed torch unexpectedly turning off after image capture in Redmi Note 6 Pro. 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. Fixed the still image capture malfunction issue when extensions are enabled and VideoCapture is bound together. Enabled UltraHDR still image capture support for Extensions if the device can support it. Fixed flash timing issue for flash capture with CameraEffect targeting image captures on TCL devices.

1.5.0-alpha03

Version 1.5.0-alpha03

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. Fixed preview and video under-exposure issue on TCL devices when VideoCapture is enabled. 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). Fixed the VideoRecordEvent.Finalize.ERROR_INSUFFICIENT_STORAGE event is not triggered when recording a video and there is insufficient storage space available.

1.4.0

Version 1.4.0

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. 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.

1.4.0-rc04

Version 1.4.0-rc04

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).

1.5.0-alpha02

Version 1.5.0-alpha02

New APIs for querying camera features supported by the device. For example, checking if HDR and 60FPS can be enabled at the same time. It includes 2 artifacts: camera-feature-combination-query and camera-feature-combination-query-play-services. This is a compatible version of camera2's CameraManager#getCameraDeviceSetup#isSessionConfigurationSupported API with additional data provided by Google Play Service. Fixed Preview/VideoCapture target frame rate issue on LEGACY level devices. The target frame rate set via the setTargetFrameRate or Camera2Interop API was always overwritten to the value provided by the AeFpsRangeLegacyQuirk. With this fix, CameraX library will respect the value set via the setTargetFrameRate or Camera2Interop API. Added flash/torch/3A functionalities for image captures with CameraEffect. The image captures with CameraEffect should now have the same pre-capture and post-capture processings (e.g. flash trigger, 3A convergence etc. when applicable) as image capture without any CameraEffect. Excluded problematic output sizes for ImageAnalysis on Samsung SM-A057G device. When ImageAnalysis uses a resolution larger or equal to 1920x1440, it will cause black preview issue. Applied ExcludedSupportedSizesQuirk to the SM-A057G device to avoid the issue. Fixed Preview/VideoCapture target frame rate issue when stream sharing mechanism is enabled internally to share a stream to Preview and VideoCapture. Enabled the workaround to fix the incorrect JPEG image metadata issue on Samsung S10e and S10+ devices. With the fix, CameraX can successfully save the JPEG image, or correct Bitmap objects can be returned when calling the ImageProxy.toBitmap() function on these devices if the incorrect JPEG image metadata issue happens. Disabled extensions for Samsung A52s' back camera whose id is 0, because native crashes might happen when capturing HDR images and configuring capture sessions might fail for the BOKEH or FACE_RETOUCH modes. Fixed the VideoRecordEvent.Finalize.ERROR_INSUFFICIENT_STORAGE event is not triggered when recording a video and there is insufficient storage space available. Fixed issue where second video recording attempt fails on Oppo A5 (CPH1931).

1.4.0-rc03

Version 1.4.0-rc03

Added flash/torch/3A functionalities for image captures with CameraEffect. The image captures with CameraEffect should now have the same pre-capture and post-capture processings (e.g. flash trigger, 3A convergence etc. when applicable) as image capture without any CameraEffect. Optimized the pinch-to-zoom smoothness in PreviewView Decouple Ultra HDR from 10-bit output capability, as Ultra HDR support no longer requires devices to have 10-bit output capability.

1.4.0-rc02

Version 1.4.0-rc02

Fixed the crash when bindToLifecycle is invoked with a destroyed LifecycleOwner. Added visibility animation in ScreenFlashView for ScreenFlash#apply which also fixes bugs due to brightness change completing asynchronously after some time. Improved zooming smoothness by overriding zoom settings in the framework on supported devices.

1.5.0-alpha01

Version 1.5.0-alpha01

A new artifact, camera-compose is released for the CameraX Viewfinder Compose Adapter which displays a Preview stream from a CameraX SurfaceRequest from camera-core. Added a new composable, CameraXViewfinder, which acts as an idiomatic composable that adapts CameraX SurfaceRequests for the composable Viewfinder. Provide API to set composition settings for dual concurrent camera video capture. The settings include alpha value for blending, offset in x, y coordinates, scale of the width and height of camera frame display window. The offset, width and height are specified in normalized device coordinates. Exposed CameraProvider.getCameraInfo to be a formal API. Added API PendingRecording.withAudioEnabled(boolean initialMuted) to control the initial mute state. Fixed the crash when bindToLifecycle is invoked with a destroyed LifecycleOwner. Fixed Preview is black screen in front camera while binding with VideoCapture on Motorola Edge 20 Fusion. Optimized the configuration for detecting zoom gestures in PreviewView to improve smoothness.

1.4.0-rc01

Version 1.4.0-rc01

Added experimental CameraInfo.getCameraInfo to provide specific camera information without the need of binding use cases to the camera. Added PreviewView.getScreenFlash and PreviewView.setScreenFlashOverlayColor APIs for cases where ScreenFlashView is not explicitly added. Fixed exposure and color tint issues when image captured with flash enabled under low light with VideoCapture use case bound. Fix the issue that interrupting a takePicture request with Extensions enabled could fail to get result and the next takePicture request might no longer work. Fixed a memory leakage issue that happens when Extensions are enabled. Resolved a CameraX extensions malfunction on devices like Pixel 7/8 and Samsung Galaxy S24 series. The issue, stemming from a Camera2OutputConfigImpl conversion problem in release mode, surfaced after upgrading AGP to 8.5.1 and enabling minification.

1.4.0-beta02

Version 1.4.0-beta02

Similar to VideoCapture, add setMirrorMode for Preview use case. It will support mirror mode ON and OFF for Preview stream via OutputConfiguration.setMirrorMode from API 33 and above, for older APIs, it will be no-op. Fixed the issue that apps can't take pictures successfully on Samsung Tab A8 when ImageCapture selects 1920x1080 under Preview + VideoCapture + ImageCapture UseCase combination. Fixed persistent recording may fail to continue recording after switching camera.

1.4.0-beta01

Version 1.4.0-beta01

Added ZoomGestureDetector.ZoomEvent to encapsulates the states of a zoom gesture. Fixed a bug that still capture and tap-to-focus do not use the repeating request FPS/stabilization mode values which may recreate capture session and cause latency issues or Preview freeze in some devices. Fixed a bug where High Resolutions can not be selected when CameraEffect is enabled on some devices. (e.g. 4000x3000 on Samsung A32 5G). Fixed a crash when taking picture with Preview, ImageCapture and VideoCapture(UHD) are bound on Pixel 4XL API29. Support virtual devices: Context passed into ProcessCameraProvider will preserve the device ID to ensure the functionality in a virtual device environment.

1.4.0-alpha06

Camera Viewfinder Version 1.4

Rename Viewfinder's ImplementationMode Enums to better reflect underlying implementations, and add fixed constants for TransformationInfo.sourceRotation. Added ZoomGestureDetector.ZoomEvent to encapsulates the states of a zoom gesture.

1.0.0-alpha01

Camera Viewfinder Compose Version 1.0

New library. This library introduces a Compose native Viewfinder composable, that can be used with CameraX and Camera2. The composable Viewfinder supports different aspect ratios, and handling of touch events.

1.4.0-alpha05

Version 1.4.0-alpha05

Converted ProcessCameraProvider into Kotlin implementation. Added ImageCapture.takePicture suspend functions to allow it to be called in a Kotlin-idiomatic way. Add output format APIs to ImageCapture, and add getSupportedOutputFormats method to ImageCaptureCapabilities for querying device capability. The default output format value is OUTPUT_FORMAT_JPEG, which captures SDR images in JPEG format. When the device supports Ultra HDR and the output format is set to OUTPUT_FORMAT_JPEG_ULTRA_HDR, CameraX will capture Ultra HDR compressed images using the JPEG/R image format. The format is backwards compatible with SDR JPEG format and supports HDR rendering of content. This means that on older apps or devices, images appear seamlessly as regular JPEG; on apps and devices that have been updated to fully support the format, images appear as HDR. Add PhysicalCameraInfo in CameraInfo to query physical camera information and add physical camera id setter/getter in CameraSelector Replace CameraController#COORDINATE_SYSTEM_VIEW_REFERENCED with ImageAnalysis#COORDINATE_SYSTEM_VIEW_REFERENCED. The value of the constant remains the same. This is for consolidating all the constants into one place. New RetryPolicy API empowers developers to customize retry behavior for CameraX initialization. Enable creation of ImageCaptureLatencyEstimate object to assist with testability Add a ImageAnalysis#COORDINATE_SYSTEM_SENSOR. When this is used, the MlKitAnalyzer returns coordinates in the camera sensor coordinate system. Exposed extensions metadata API. New CameraExtensionsInfo and CameraExtensionsControl interfaces allow applications to monitor and adjust extension strength settings. Applications can obtain the CameraExtensionsInfo or CameraExtensionsControl instance via the newly added ExtensionsManager#getCameraExtensionsInfo() or ExtensionsManager#getCameraExtensionsControl() methods. Added ProcessCameraProvider.awaitInstance which is a suspending version of ProcessCameraProvider.getInstance Add a PreviewView#getSensorToViewTransform() API. The Matrix represents the transformation from camera sensor coordinates to the PreviewView's coordinates. This can be used to transform coordinates from one UseCase to another. For example, transforming the coordinates of detected objects in ImageAnalysis to PreviewView overlay. Make camera-viewfinder-core API more generic so it can be used by camera-viewfinder and camera-viewfinder-compose. Add getSurface function to ViewfinderSurfaceRequest. Use camera-viewfinder-core in camera-viewfinder and deprecate ViewfinderSurfaceRequest and CameraViewfinder. Added ZoomGestureDetector that interprets scaling gestures specifically configured for pinch-to-zoom activity. Fixed ImageAnalysis' resolution selection issue related to the analyzer default target resolution setting: target resolution was incorrectly kept as 640x480 even if applications has set a different analyzer default resolution setting. If applications encounter this issue (1.3.0 ~ 1.3.2) and can't upgrade to use the newer version releases which contain the solution, directly setting a ResolutionSelector with the preferred resolution and a matching AspectRatioStrategy to the ImageAnalysis UseCase can workaround this issue. Fixed an issue that queued takePicture request might fail to run if the current request is failed. Make the invalid JPEG data check applied to Vivo X60 and X60 Pro devices. This can fix abnormally large image issue on these devices. Fixed the incorrect JPEG image metadata issue on Samsung A24 devices. With the fix, CameraX can successfully save the JPEG image, or correct Bitmap objects can be returned when calling the ImageProxy.toBitmap() function on Samsung A24 devices. Make the invalid JPEG data check applied to all Samsung devices if the captured image is larger than 10 MB. This can fix abnormally large iamge issue on Samsung devices. Removed ImageAnalysis support on CameraX Extensions as many OEMs' Extensions implementations don't work w

1.4.0-alpha04

Version 1.4.0-alpha04

New artifact: camera-effects: A library for applying real time effects to CameraX output, including Preview, VideoCapture and/or ImageCapture. This artifact contains OpenGL implementations of the CameraEffect API that manipulates the camera output efficiently. OverlayEffect: for drawing overlays with Android's Canvas API. This allows the app to apply a watermark or highlight detected objects on camera outputs. DynamicRange APIs for the Preview Use Case: The dynamic range can now be set on the Preview Use Case, independently of the Video Use Case. This allows HDR dynamic ranges such as HLG10 for Preview alone. New APIs are also available in CameraInfo to query which dynamic ranges each camera supports. Renamed ScreenFlashUiCompleter to ScreenFlashListener and moved ScreenFlashUiCompleter#getExpirationTimeMillis to expirationTimeMillis parameter of ScreenFlash#apply. New APIs added to allow dynamic range to be set on Preview use case, and to query dynamic ranges supported by each camera. This allows HDR dynamic ranges, such as HLG10, to be used with the Preview use case alone, no longer requiring a VideoCapture to be bound at the same time. Renamed getMirroring() to isMirroring()

1.4.0-alpha03

Version 1.4.0-alpha03

Added CameraInfo.mustPlayShutterSound to provide the information of whether a shutter sound must be played in accordance to regional restrictions. Added OnImageCapturedCallback.onCaptureStarted and OnImageSavedCallback.onCaptureStarted for notifying when the camera has started exposing a frame. It's recommended to play the shutter sound or the shutter animation at this point. Added Screen Flash feature support in CameraX for front camera image capture. CameraX will take care of the framework-side API handling and sync the timing with application's UI changes as required (e.g. AE precapture trigger after app screen color/brightness change). Apps will only need to add their UI side implementations in the ScreenFlashUiControl interface provided to CameraX. Added Screen Flash feature UI-side implementation support in CameraX. Apps will be able to get a basic ImageCapture.ScreenFlashUiControl implementation from PreviewView or the newly added ScreenFlashView which will add a mono-color overlay view and maximize screen brightness during screen flash photo capture. Supports new Extensions features(postview and capture process progress): Added ImageCapture#getImageCaptureCapabilities() APIs for apps to query the capabilities of the postview and capture process progress callback. Apps can enable the postview using the ImageCapture.Builder#setPostviewEnabled(). The postview size can be selected using ImageCapture.Builder#setPostviewResolutionSelector(). When invoking takePicture(), onPostviewBitmapAvailable and onCaptureProcessProgressed can be implemented in OnImageSavedCallback or OnImageCapturedCallback to get the postview and process progress notification if supported. APIs for calculate coordinates transformation from sensor to the current buffer, with a flag indicating whether the Surface contains the camera orientation info. Expose the API to query PreviewCapabitlity in Preview UseCase. Added APIs to support more qualities for VideoCapture. Recorder.Builder#setVideoCapabilitiesSource(int) can be used with VIDEO_CAPABILITIES_SOURCE_CODEC_CAPABILITIES to create a Recorder instance which supports more qualities than VIDEO_CAPABILITIES_SOURCE_CAMCORDER_PROFILE. A common use case is when the application strives to record UHD video whenever feasible, but the device's CamcorderProfile does not include a UHD settings, even though the codec is capable of recording UHD video. Add ImageAnalysis output format getter/setter to CameraController. From Camera 1.3.1: Improved the ProcessCameraProvider#bindToLifecycle() performance. The major change is to optimize the process of identifying the most suitable size combinations for UseCases. The optimal results vary based on the specific UseCase combinations and the number of supported output sizes for the target devices. Allow the use of VideoCapture when Extensions are enabled. Fixed large captured JPEG image issue on Samsung A71 and M51 series devices. The captured JPEG images contain redundant 0's padding data in the JFIF compressed data segment. It causes the captured images to have extreme file size. Those redundant 0's padding data will be removed to make the captured images have normal image file sizes. Disable ImageAnalysis support on Pixels to avoid the bug on Pixel that returns the non-empty ImageAnalysis supported sizes accidentally. Fixed performance issue where CPU loading and power consumption increased when Extensions are enabled. Added Snapdragon 480 to the CameraUseInconsistentTimebaseQuirk. This fixes an issue on Android 12 for devices using this chipset where the audio in recordings is offset by the amount of time the device is in a suspended state.

1.4.0-alpha02

Version 1.4.0-alpha02

Rename the API to setCameraOpenRetryMaxTimeoutInMillisWhileResuming and rename the argument. Adding APIs to query the device capability and enable video/preview stabilization. Provide API to customize the camera open retrying max timeout time. Released ProcessCameraProvider.shutdownAsync as a public testing API to allow process camera provider to be used in test suites which may need to initialize CameraX in different ways

Discussion