MENU

Nhà Việt

Phục Vụ

24/24

Email Nhà Việt

[email protected]

CameraX | Jetpack | Android Developers

save and categorize content base on your predilection .

CameraX

CameraX cost associate in nursing addition to Jetpack that shuffle information technology easy to total television camera capability to your app. The library put up adenine number of compatibility fix and workarounds to avail make the developer experience coherent across many device .

Save and categorize content based on your preferences.

CameraX

CameraX is an addition to Jetpack that makes it easier to add camera
capabilities to your app. The library provides a number of compatibility fixes
and workarounds to help make the developer experience consistent across many
devices.

This table lists all the artifacts in the androidx.camera group.

This library was last updated on: July 26, 2023

Device testing

This library was last updated on: July 26, 2023

CameraX is tested on many devices in our lab. To see a list of the devices
currently in the lab, see CameraX lab-tested
devices
.

Declaring dependencies

To add a dependency on CameraX, you must add the Google Maven repository to
your project. Read
Google’s Maven repository for more
information.

Add the dependencies for the artifacts you need in the build.gradle file for
your app or module:

Groovy

dependencies {
  // CameraX core library using the camera2 implementation
  def camerax_version = "1.3.0-beta02"
  // The following line is optional, as the core library is included indirectly by camera-camera2
  implementation "androidx.camera:camera-core:${camerax_version}"
  implementation "androidx.camera:camera-camera2:${camerax_version}"
  // If you want to additionally use the CameraX Lifecycle library
  implementation "androidx.camera:camera-lifecycle:${camerax_version}"
  // If you want to additionally use the CameraX VideoCapture library
  implementation "androidx.camera:camera-video:${camerax_version}"
  // If you want to additionally use the CameraX View class
  implementation "androidx.camera:camera-view:${camerax_version}"
  // If you want to additionally add CameraX ML Kit Vision Integration
  implementation "androidx.camera:camera-mlkit-vision:${camerax_version}"
  // If you want to additionally use the CameraX Extensions library
  implementation "androidx.camera:camera-extensions:${camerax_version}"
}

Kotlin

dependencies {
    // CameraX core library using the camera2 implementation
    val camerax_version = "1.3.0-beta02"
    // The following line is optional, as the core library is included indirectly by camera-camera2
    implementation("androidx.camera:camera-core:${camerax_version}")
    implementation("androidx.camera:camera-camera2:${camerax_version}")
    // If you want to additionally use the CameraX Lifecycle library
    implementation("androidx.camera:camera-lifecycle:${camerax_version}")
    // If you want to additionally use the CameraX VideoCapture library
    implementation("androidx.camera:camera-video:${camerax_version}")
    // If you want to additionally use the CameraX View class
    implementation("androidx.camera:camera-view:${camerax_version}")
    // If you want to additionally add CameraX ML Kit Vision Integration
    implementation("androidx.camera:camera-mlkit-vision:${camerax_version}")
    // If you want to additionally use the CameraX Extensions library
    implementation("androidx.camera:camera-extensions:${camerax_version}")
}

Feedback

Your feedback helps make Jetpack better. Let us know if you discover new issues or have
ideas for improving this library. Please take a look at the
existing issues
in this library before you create a new one. You can add your vote to an existing issue by
clicking the star button.

Create a new issue

See the Issue Tracker documentation
for more information.

Version 1.3

Version 1.3.0-beta02

July 26, 2023

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

Bug Fixes

  • Use torch as flash for Pixel 4 and 5 variants to improve capture quality in low light (I56ff5, b/280221967)
  • Fixed large captured JPEG image issue on Samsung A5 (2017) 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 about 32 MB file size. Those redundant 0’s padding data will be removed to make the captured images have normal image file sizes. (I29837, b/288828159)
  • Fixed retry not triggering properly in case of capture failure in problematic devices mentioned in CaptureFailedRetryQuirk. (I7b589)

Version 1.3.0-beta01

June 21, 2023

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

API Changes

  • Renamed the ResolutionSelector.Builder#setHighResolutionEnabledFlag(int) function name to setAllowedResolutionMode and renamed the ResolutionSelector#HIGH_RESOLUTION_FLAG_OFF/ON constants to PREFER_CAPTURE_RATE_OVER_HIGHER_RESOLUTION/PREFER_HIGHER_RESOLUTION_OVER_CAPTURE_RATE. (If84e8)
  • Removed deprecated API ImageAnalysis.setTargetRotationDegrees(int), ImageCapture.setTargetRotationDegrees(int) and VideoCapture.setTargetRotationDegrees(int). (Id8e77)
  • The DynamicRange class respresent the dynamic range of images. This can be used to select High Dynamic Range formats as the output of VideoCapture through VideoCapture.Builder#setDynamicRange(). (Ib0377)
  • Added an isImageAnalysisSupported API to the ExtensionsManager which apps can determine if an ImageAnalysis use case can be bound along with Preview and ImageCapture when Extensions are enabled. (I1bc63)
  • The new VideoCapabilities class obtained from the Recorder can be used to query supported dynamic ranges and qualities for video recording on the device. QualitySelector‘s getSupportedQualities() and isQualitySupported() methods are being deprecated. Please use VideoCapabilities‘s getSupportedQualities() and isQualitySupported() methods instead. (I04014)
  • CameraController#setVideoCaptureTargetQuality() is renamed to setVideoCaptureQualitySelector and takes argument QualitySelector, which provides more flexibility for video quality setup. CameraController#getVideoCaptureTargetQuality() is changed to getVideoCaptureQualitySelector accordingly. (I520ed)
  • Removed the experimental annotation for video features. The video features are now stable. (I1a113)

Bug Fixes

  • Use torch as flash on Samsung SM-A320 models to improve the speed and the captured image quality in low light. (I6a022, b/286190938)
  • Add ImageFormat.JPEG format support for ImageProxy.toBitmap(). If the JPEG byte array cannot be decoded, an UnsupportedOperationException will be thrown. (I81958, b/282057603)

Version 1.3.0-alpha07

May 24, 2023

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

New Features

  • The new VideoCapture.Builder# setTargetFrameRate(Range) API allows video recordings to be captured at other frame rates besides the device default. The available frame rates for recordings can be queried through the new CameraInfo#getSupportedFrameRates() API.

API Changes

  • Renamed ResolutionSelector#HIGH_RESOLUTION_FLAG_OFF/ON constants to ALLOWED_RESOLUTIONS_NORMAL/SLOW and renamed the builder setHighResolutionEnabledFlag function name to setAllowedResolutionMode. (Iae817)
  • CameraInfo#getSupportedFrameRateRanges() now returns a Set rather than a List to better represent that the ranges are unordered. (I02f43)
  • Add an error listener to CameraEffect to handle unrecoverable errors (Ice471)
  • Add public constructor in ResolutionInfo for better testability (If6d1c)
  • Provided an API UseCase.snapToSurfaceRotation(int) to replace usage of setTargetRotationDegrees and deprecate API ImageAnalysis.setTargetRotationDegrees(int), ImageCapture.setTargetRotationDegrees(int) and VideoCapture.setTargetRotationDegrees(int). (Ia9010)
  • Added new API Preview#getTargetFrameRate and Preview.Builder#setTargetFrameRate to be able to set and retrieve target frame rate for Preview use case (If4f22)
  • VideoRecordEvent.Finalize will now complete with error code ERROR_RECORDING_GARBAGE_COLLECTED when the Recording object is stopped due to garbage collection. (Iba974)

Bug Fixes

  • Fixed NullPointerException when the cached output sizes in StreamConfigurationMapCompat are null. (Idf124, b/282025204)
  • Fixed the issue that Preview.setSurfaceProvider(null) doesn’t pause the preview in Extensions (Ia903e)
  • Fixed an issue where ConcurrentModificationException is thrown during camera opening when VideoCapture is bound. (Ic8ac4)

Version 1.3.0-alpha06

April 19, 2023

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

New Features

  • Concurrent camera is a new feature introduced from Android 11, which supports simultaneous streaming of camera devices, for example, it allows a device to have both the front and back cameras operating at the same time.
    CameraX currently only supports dual concurrent cameras, which allows two cameras operating at the same time, with at most two {@link UseCase}s bound for each. The max resolution is 720p or 1440p, more details in the following link, see CameraManager#getConcurrentCameraIds()
  • Introducing the new ResolutionSelector API which covers the following features:
    • Applications can specify aspect ratio and resolution strategies to select the best resolution for their needs.
    • All sizes and aspect ratio parameters are expressed in the coordinates of the camera device sensor.
    • Applications can implement a custom resolution filter to arrange the supported sizes in the desired order.
    • Applications can also enable high resolution capture to obtain higher resolution images. However, please note that using a high resolution may result in slower capture times.
    • Added VideoCapture mirroring APIs. Videos recorded by VideoCapture are not mirrored by default. However, the camera preview is mirrored on the front camera by default. VideoCapture mirroring APIs make it possible to align to the camera preview when using the front camera. There are three MirrorMode, OFF, ON and ON_FRONT_ONLY. To align to the camera preview, it is recommended to use ON_FRONT_ONLY which means that mirroring is not enabled for the rear camera but is enabled for the front camera.

API Changes

  • Exposed new ResolutionSelector API. Applications can specify aspect ratio and resolution strategies with fallback rules or a custom resolution filter to get the desired results. Applications can specify a flag to enable high resolution capture. This will allow CameraX to select higher resolutions when taking photos or videos. However, please note that using a high resolution may result in slower capture times. (Ibed95)
  • The FPS ranges supported by the AE algorithm can now be queried via CameraInfo#getSupportedFrameRateRanges(). (Iaa67f)
  • Consolidate the names of all frame rate methods into using ‘FrameRate’. Correct the javadoc mistake in VideoCapture#getTargetFrameRate() (I83304)
  • Deprecated the legacy setTargetAspectRatio and setTargetResolution API. Please use the new ResolutionSelector API instead. (I542c3)
  • Added public APIs for concurrent dual camera, including
    1. List> getAvailableConcurrentCameraInfos()
    2. ConcurrentCamera bindToLifecycle(@NonNull ConcurrentCameraConfig concurrentCameraConfig)
    3. boolean isConcurrentCameraModeOn()
      and ConcurrentCameraConfig, SingleCameraConfig and ConcurrentCamera (Iab1c1)
  • Make ImageProcessor.Response#getOutputImage NonNull (Ib9c60)
  • Added VideoCapture mirroring APIs, including VideoCapture.Builder.setMirrorMode(int) and VideoCapture.getMirrorMode(). The APIs are useful for applications require the video recording to be consistent with common camera preview behavior, i.e. the rear camera preview is not mirrored but the front camera preview is mirrored. (I713b6, b/194634656)
  • Add setTargetFrameRate() API in the VideoCapture.Builder and getTargetFramerate() API in VideoCapture (I109d4)
  • Make SurfaceOutput extending Closable and hide SurfaceOutput.Event‘s public constructor. (I60ea8)
  • Added Recording.mute to dynamically mute or unmute an in-processing recording. RecordingStats will contain AudioStats.AUDIO_STATE_MUTED when the in-processing recording is muted explicitly. (Ie17fc)
  • Made #setEffects() parameter non-null. Add a #clearEffects() API for clearing effects. The app should call #clearEffects() to remove effects. (I4b4d9)
  • Add a second constructor for ViewfinderSurfaceRequest.Builder to take a builder for copy constructor (I621a7)

Bug Fixes

  • Fixed the issue where apps invoking Extensions API could crash when closing the camera (Ib27e5)
  • Fixed an issue where VideoCapture could not work with the front camera on some devices. For example, on Samsung Galaxy S23 and Xiaomi 2107113SG. (Ibec7e, b/270656244)
  • Fixed the issue where taking pictures using File in the external storage public folder will always fail in Android 10 or above. Please note that in Android 10, taking pictures using File in the external storage public folder also requires setting requestLegacyExternalStorage to true in application tag. (I11b2c)
  • Fixed a RejectedExecutionException crash in DefaultSurfaceProcessor. The crash could happen when VideoCapture is bound and the activity is paused. (Idb46a, b/273713906)

Version 1.3.0-alpha05

March 22, 2023

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

API Changes

  • Added VideoCapture rotation APIs, including VideoCapture.Builder.setTargetRotation(int), VideoCapture.setTargetRotation(int), VideoCapture.setTargetRotationDegrees(int) and VideoCapture.getTargetRotation(). The APIs are useful for applications that lock the device orientation. ImageCapture.setTargetRotationDegrees(int) and ImageAnalysis.setTargetRotationDegrees(int) are also added. (Id3ffe, b/205242781)
  • Allow VIDEO_CAPTURE and PREVIEW|VIDEO_CAPTURE as effects target. Effects that targets VIDEO_CAPTURE will be applied to the VideoCapture UseCase; Effects that targets PREVIEW|VIDEO_CAPTURE will be applied to a shared stream before copying to Preview and VideoCapture stream. (Iee6f3)

Bug Fixes

  • From Camera 1.2.2: Fixed the issue where CameraX Extensions don’t work properly when proguard is enabled on some devices such as Pixel (I90aa2)
  • Fixed a PreviewView bug that if the app handles screen orientation itself. the preview might become distorted upon rotation. This only happens on certain devices. It can be reproduced on Pixel a4, Pixel 5, and Pixel 6a. (I14340, b/223488673)

Version 1.3.0-alpha04

February 22, 2023

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

New Features

A new feature to support previously unsupported Surface combinations by sharing one stream to multiple UseCases.

  • Previously, when binding “Preview, VideoCapture, ImageAnalysis” on camera hardware level FULL and below, or binding “Preview, VideoCapture, ImageCapture” on hardware level LEGACY, CameraX throws IllegalArgumentException.
  • The new behavior is that the bindings will work without throwing exceptions. Instead, CameraX uses OpenGL to copy a shared stream to both Preview and VideoCapture.
  • As the cost of the buffer copy, the app may see an increase in latency and power consumption.

API Changes

  • Add API to convert ImageProxy to Bitmap. The supported ImageProxy format is ImageFormat.YUV_420_888 and PixelFormat.RGBA_8888. If the format is invalid, IllegalArgumentException will be thrown. (Ic7110)
  • Add CoroutineCameraViewfinder to support configuring viewfinder using suspending functions in Kotlin. (I657bc)
  • Add new public constructor for ViewfinderSurfaceRequest. It provides the flexibility when user cannot provide CameraCharacteristics. (Ie6549)

Bug Fixes

  • Fixed the Extensions crash that happens on some Samsung devices when pausing/resuming the app too quickly (Iaca26)

Version 1.3.0-alpha03

January 25, 2023

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

API Changes

  • Added CameraInfo.getIntrinsicZoomRatio to provide angle of view information relative to the default camera. (Ib300c)
  • Added CameraInfo.getLensFacing to provide lens facing information. Added CameraSelector#LENS_FACING_EXTERNAL as an experimental feature for selecting external cameras. (Icaf3e)
  • Add #setEffect() to CameraController that allows adding effects to camera output. (I1d21f)
  • Add invalidate() method to SurfaceRequest. The Surface provider can notify that the previously provided surface is no longer valid. (Idc649)
  • Add a ImageProcessor API. This interface is for inject post-processing effects into the ImageCapture pipeline. (I575c6)
  • Added API Recorder.Builder.setAspectRatio() which can be combined with QualitySelector to support more video resolutions. (I8a082)
  • Added Recorder.Builder#setTargetVideoEncodingBitRate to set Target Video Encoding BitRate and Recorder#getTargetVideoEncodingBitRate to get Target Video Encoding BitRate. (I5984d)

Bug Fixes

  • Fixed ImageCapture failed when there is no flash unit and flash mode is on. (I9e8b4, b/263391112)
  • Fixed JPEG image corruption issue if writing Exif location data on some Samsung Android 12 devices. (Ib7086, b/263747161, b/263289024)
  • when setting torch/zoom prior before camera initialization compelets, e.g. calling CameraController#enableTorch, the pending action is cached and submitted once the initialization compeltes. (I11e92, b/264157663)

Version 1.3.0-alpha02

December 7, 2022

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

API Changes

  • add a new API for applying post-processing effect to Preview output. (Ic17d5)
  • Renamed OutputOptions.getDurationLimit to OutputOptions.getDurationLimitMillis and OutputOptions.setDurationLimit to OutputOptions.setDurationLimitMillis. (I91f0c)
  • Add AudioConfig class to handle the audio related setting while recording video. The @RequiresPermission annotation is moved from startRecording functions to AudioConfig to avoid unnecessary permission requests for the cases that audio is not needed. (I28755)
  • Remove Metadata, OnVideoSavedCallback, OutputFileOptions and OutputFileResults classes that are no longer used after applying the new video capture API. (I38cd8)
  • Apply the new video capture API. The getVideoCaptureTargetSize and setVideoCaptureTargetSize methods are replaced with the getVideoCaptureTargetQuality and the setVideoCaptureTargetQuality methods accordingly, as setTargetResolution is no longer supported. (I2a1d5)

Bug Fixes

  • Remove deprecated core.VideoCapture API. (I531e0)
  • Fixed the issue that the onError callback is not called when taking pictures without the storage permission.(I936db, b/244807669)
  • Improve camera extensions quality and reliability. Camera extensions are disabled on Motorola devices using Camera Extensions v1.1.0 and older due to issues with Bokeh support, image capture, and preview not resuming. (Id3ce3)
  • Fixed native crash when video cropping via ViewPort is enabled on legacy devices. (I16b8a, b/251357665)

Version 1.3.0-alpha01

November 9, 2022

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

New Features

  • Camera-viewfinder has been published officially. Camera-viewfinder provides a base viewfinder widget that can display the camera feed for Camera2. Please check the sample code for an example.

API Changes

  • Added OutputOptions.setDurationLimit to allow setting of video duration limit. The recording will be automatically finalized when exceeding the specified duration limit. (I902a0)
  • Add video recording audio error state AudioStats.AUDIO_STATE_SOURCE_ERROR. Sent when audio source setup fails or some error occurs. (I37410)

Bug Fixes

  • Add quirk to allow some problematic devices to retry capture once when encountering capture failures. (Id4795)
  • Fix PreviewView SurfaceView implementation black screen issue on ViewPager2. As part of the fix, PreviewView will reuse its SurfaceView if the requested resolution is not changed. (Ib3f27)
  • Support video cropping (WYSIWYG feature) when ViewPort or CameraController API is used. (Ifbba8, b/201085351)
  • Fixed video captured with front camera fails to record on Huawei P40 lite. (I87c57, b/250807400)

Version 1.2

Version 1.2.3

May 24, 2023

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

Bug Fixes

  • Fixed an issue where VideoCapture could not work with the front camera on some devices. For example, on Samsung Galaxy S23 and Xiaomi 2107113SG. (Ibec7e, b/270656244)

Version 1.2.2

March 22, 2023

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

Bug Fixes

  • Fixed the issue where CameraX Extensions don’t work properly when proguard is enabled on some devices such as Pixel (I90aa2)

Version 1.2.1

January 25, 2023

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

Bug Fixes

  • Fix JPEG image corruption issue if writing Exif location data on some Samsung Android 12 devices. (b/263289024)

Version 1.2.0

December 7, 2022

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

Important changes since 1.1.0

  • New library camera-mlkit-vision. Easily integrate CameraX with many MLKit features, including barcode scanning, face detection, text detection, etc. Added MLKitAnalyzer as new APIs.
  • New experimental Zero-Shutter Lag API. Optimizes capture pipeline to have better latency while keeping good image quality. When the capture mode is set to CAPTURE_MODE_ZERO_SHUTTER_LAG, the latency between the shutter button is clicked and the picture is taken is expected to be minimized, compared with other capture modes. On devices that don’t support ZERO_SHUTTER_LAG, it’ll fallback to CAPTURE_MODE_MINIMIZE_LATENCY.
  • Deprecate android.camera.core.VideoCapture.
  • Added setStreamUseCase() as a public Camera2Interop API.
  • Added API level requirement for setOutputImageRotationEnabled.
  • Renamed ImageAnalysis.Analyzer#getTargetResolutionOverride() to ImageAnalysis.Analyzer#getDefaultTargetResolution().
  • Added API for setting location metadata to the saved video.
  • Fixed low framerate when using VideoCapture and Preview use cases with 16:9 aspect ratio
  • Fixed the black preview issue that happens when BOKEH extension is enabled on some Samsung devices and the user switches the cameras.
  • Fixed Samsung J7 Prime (SM-G610M) and J7 (SM-J710MN) Preview/VideoCapture stretched issue on API level 27 devices.
  • Disabled the workaround to flip the AF region horizontally of front cameras on Samsung Android T since the issue was fixed

Version 1.2.0-rc01

October 24, 2022

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

API Changes

  • Add setStreamUseCase API for OutputConfiguration. User can specify the Stream Use Case for the stream session, overrding CameraX’s internal logics to choose Stream Use Case in order to optimize according to their need. (Ib1a95)

Bug Fixes

  • Fixed Samsung J7 Prime (SM-G610M) and J7 (SM-J710MN) Preview/VideoCapture stretched issue on API level 27 devices. Resolution 1920×1080 causes the Preview/VideoCapture images to be stretched. Added workaround to not select the 1920×1080 resolution for Preview or VideoCapture to avoid the image stretched problem. (I0e04e)
  • Fixed low framerate when using VideoCapture and Preview use cases with 16:9 aspect ratio on some Huawei devices. (If8c88, b/223643510)
  • Fixed camera open failure when Preview’s SurfaceProvider is not set. As part of the fix, Preview with no SurfaceProvider set will now not be configured into the camera capture session. (I99681)

Version 1.2.0-beta02

September 21, 2022

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

API Changes

Bug Fixes

  • Disabled the workaround to flip the AF region horizontally of front cameras on Samsung Android T since the issue was fixed. (I05f69)
  • Fixed the black preview issue that happens when BOKEH extension is enabled on some Samsung devices and user switches the cameras. (If6168)

Version 1.2.0-beta01

August 24, 2022

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

New Features

  • New library camera-mlkit-vision. Easily integrate CameraX with many MLKit features, including barcode scanning, face detection, text detection, etc. Please find the sample code here.
  • New experimental Zero-Shutter Lag API. Optimizes capture pipeline to have better latency while keeping good image quality. When the capture mode is set to CAPTURE_MODE_ZERO_SHUTTER_LAG, the latency between the shutter button is clicked and the picture is taken is expected to be minimized, compared with other capture modes. On devices that don’t support ZERO_SHUTTER_LAG, it’ll fallback to CAPTURE_MODE_MINIMIZE_LATENCY.
  • Made ImageAnalysis.Analyzer and MLKitAnalyzer as official APIs.
  • Exposed API for setting location metadata to the saved video.
  • Rename ImageAnalysis.Analyzer#getTargetResolutionOverride() to ImageAnalysis.Analyzer#getDefaultTargetResolution().

Bug Fixes

  • Fixed Alps k61v1_basic_ref image capture issue. The captured JPEG images from HAL have incorrect Exif metadata. The Exif metadata doesn’t have the 0xffd9 or 0xffda tag to make ExifInterface correctly parse the attributes. Capturing the images in YUV format and then compressing them to JPEG output images to workaround this issue. (I45abb)

Version 1.2.0-alpha04

July 27, 2022

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

API Changes

  • Rename ImageAnalysis.Analyzer#getTargetResolutionOverride() to ImageAnalysis.Analyzer#getDefaultTargetResolution(). The behavior is also changed so that the value returned by this method can be overridden by the value of ImageAnalysis#setTargetResolution(). (If1d36)
  • Exposed API for setting location metadata to the saved video. An android.location.Location object can be set via new API androidx.camera.video.OutputOptions.Builder.setLocation(Location). (I313a0, b/204197544)

Bug Fixes

  • Fix the issue to take picture with unbind preview (Ie70b6, b/235119898)
  • Fixed crash in Recorder when attempting to record while audio source is unavailable. (I9f652)

Version 1.2.0-alpha03

June 29, 2022

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

API Changes

  • Removed the experimental annotation for ImageAnalysis.Analyzer and MLKitAnalyzer. (I0ff22)

Bug Fixes

  • Added auto focus default timeout 5000ms that will complete the AF part with isFocusSuccessful false if the FocusMeteringAction is not cancelled and the AF part is not converged in the duration. (Ibc2e3)
  • Fix the issue to take picture with unbind preview (I1d3a2, b/235119898)
  • Enabled advanced extender implementation and update the CameraX support extensions-interface version to 1.2 (I92256)

Version 1.2.0-alpha02

June 1, 2022

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

New Features

  • Expose CameraX Zero-Shutter Lag API as experimental.

API Changes

  • Add new capture mode CAPTURE_MODE_ZERO_SHUTTER_LAG in ImageCapture and add isZslSupported in CameraInfo to query the device capability. CAPTURE_MODE_ZERO_SHUTTER_LAG mode is aiming to provide the minimum latency for instant capture. It is implemented based on a ring buffer, which caches intermediate capture results for later reprocessing when the user presses buttons to take pictures. If {@link VideoCapture} is bound or flash mode is not OFF or OEM Extension is ON, this mode will be disabled automatically. (I9ae74)
  • Add ImageAnalysis.getBackgroundExecutor() method (Icc945)

Bug Fixes

  • Fixed ImageCapture takePicture method turns torch off on the reported devices. (Ib5eb5, b/228272227)
  • Fixed a bug where AssertionError not being handled when getting the CONTROL_ZOOM_RATIO_RANGE characteristic.(/Ia248a, b/231701345)

Version 1.2.0-alpha01

May 18, 2022

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

New Features

  • New library camera-mlkit-vision is launched

Bug Fixes

  • Fixed QualitySelector fails to record a UHD video when a fallback strategy is enabled. The issue happens when VideoCapture is bound with ImageCapture and Preview on a FULL or higher hardware level camera device. A fallback strategy of QualitySelector causes VideoCapture incorrectly to get a FHD resolution. UHD resolution is actually supported for this use case combination and should be adopted. (I0e788, b/230651237)
  • Fixed NullPointerException on ImageCapture.takePicture(). (I92366, b/230454568, b/229766155)
  • Fix async pause behavior of androidx.camera.video.Recorder (Ia8ce8)

Camera-Camera2, Camera-Core, Camera-Lifecycle, & Camera-Video Version 1.1.0

Version 1.1.0

June 29, 2022

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

Important changes since 1.0.0

  • Landed View, Extension and Video Capture libraries as their first RC version. From 1.1.0-beta01, all CameraX libraries will align the same version number. This will help developers track versions much easier and reduce the complexity of large version compatibility matrices.
  • Introduced new public APIs and features which including:
  • Add the official camera-video library to support video capture use cases.
  • YUV to RGB conversion and rotation capability (ImageAnalysis.Builder.setOutputImageRotationEnabled and setOutputImageFormat)
  • Support multi-window mode by allowing CameraX applications to resume the camera when the camera is interrupted by another app and focus is back.
  • Ensures CameraX works well in foldable devices by fixing some preview issues.
  • Added a CameraState API that will be exposed through CameraInfo.
  • Added an API ProcessCameraProvider.getAvailableCameraInfos() to directly retrieve information about the available cameras
  • Output JPEG format for ImageCapture#OnImageCapturedCallback when Extensions are enabled.
  • Added a API isFocusMeteringSupported in CameraInfo which allows applications to check if the given FocusMeteringAction is supported on current camera or not.
  • Exposed getResolutionInfo API to provide the resolution information for Preview, ImageCapture and ImageAnalysis.
  • Added a new API ImageCapture.Builder#setJpegQuality to allow changing the output JPEG image compression quality when taking pictures.
  • Added CameraSelector#filter to the public API to filter a list of CameraInfos based on a CameraSelector.
  • Added Camera2CameraControl.clearCaptureRequestOptions for clearing the existing capture request options.
  • Added an experimental API for using CameraController with external image processing libraries. e.g. MLKit
  • Added experimental API CameraInfo#getCameraSelector() which returns a CameraSelector unique to its camera
  • Promoted several experimental APIs to formal public APIs
  • Replaced annotation @Experimental with @RequiresOptIn to experimental APIs. For calling experimental APIs, use androidx.annotation.OptIn instead of deprecated androidx.annotation.experimental.UseExperimental.
  • Promoted the following experimental APIs to official APIs: CameraXConfig.Builder#setAvailableCamerasLimiter(), CameraXConfig.Builder#setMinimumLoggingLevel(), CameraXconfig.Builder#setSchedulerHandler(), CameraXConfig#getAvailableCamerasLimiter(), CameraXConfig#getMinimumLoggingLevel(), CameraXConfig#getCameraExecutor(), CameraXConfig#getSchedulerHandler(),
  • @ExperimentalCameraFilter APIs
  • experimental exposure compensation APIs.
  • Promoted the experimental UseCaseGroup API for camera-core, camera-lifecycle and camera-video. Added ViewPort#getLayoutDirection, ViewPort.Builder#setLayoutDirection and ViewPort.Builder#setScaleType for customizing viewport.
  • Promoted the ExperimentalUseCaseGroupLifecycle to formal public APIs.
  • Changes to the existing APIs
  • Renamed MediaStoreOutputOptions.getCollection to MediaStoreOutputOptions.getCollectionUri.
  • ActiveRecording has been renamed to “Recording” to reduce verbosity.
  • Changed QualitySelector creator API to a list-based API

Bug Fixes

  • Fixed YuvToJpegProcessor EOFException issue when extension mode is enabled and ImageCapture#CAPTURE_MODE_MAX_QUALITY mode is set.
  • Fixed codec configuration failed due to video recording is closing
  • Fixed stretched preview/video aspect ratio when recording at FHD
  • Fixed audio/video out of sync after pause and resume on some devices
  • Fixed the issue where flash is triggered during tap-to-focus (startFocusAndMetering) when flash mode is auto or always_on in low-light environment.

Version 1.1.0-rc02

June 1, 2022

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

Bug Fixes

  • Fixed NullPointerException on ImageCapture.takePicture(). (I92366, b/230454568, b/229766155)
  • Fixed a bug where AssertionError not being handled when getting the CONTROL_ZOOM_RATIO_RANGE characteristic. (Ia248a, b/231701345)

Version 1.1.0-rc01

May 11, 2022

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

New Features

  • Release the first RC version for camera-video, camera-view, and camera-extension

Bug Fixes

  • Fixed an issue where the video codec wasn’t released when VideoCapture was unbound, causing subsequent uses of VideoCapture to fail on recording with MediaCodec.CodecException, especially on API 21-22 devices. (Ie7f68)
  • Fix captured images of CameraExtensionsActivity do not be deleted in ImageCaptureTest

Version 1.1.0-beta03

April 6, 2022

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

API Changes

  • Made CaptureRequestOptions constructor restricted. (I261b6)
  • Added an experimental API for using CameraController with external image processing libraries. e.g. MLKit (I4ea71)

Bug Fixes

  • Fixed the issue that preview becomes sideway in PreviewView when activity is not restarted after rotating devices in multi-window. (I1ea36, b/223488673)
  • Fix a multi-window issue that when focus changes back to the app it fails to resume the camera when (1) other high priority app opens a different camera (2) the device is Samsung Android 12 devices. (I7e9f2)
  • Workaround included for devices that crash when checking availability of flash. These devices will not have torch available. (If26a3, b/216667482)
  • Fix AbstractMethodError issue happened when apps use extensions and enable proguard. (I7cbaf, b/222726805)
  • Force disable bokeh extension mode on Motorola razr 5G device which will cause black preview screen issue. (I35d49)
  • Fixed audio/video out of sync after pause and resume on some Samsung devices pre-API 29. (I64622, b/202798609, b/202798572)
  • Fixed audio/video out of sync after pause and resume on Sony G3125. (I2a1a5, b/202799148)
  • Fixed a crash when the Recorder encountered an InvalidConfigException. However, this fix only prevents app from crashing, but doesn’t resolve the cause of the InvalidConfigException. If the Recorder still cannot be configured, applications will receive error callback when it starts recording. (I89c29, b/213617227)

External Contribution

  • updated :compose:ui:ui-test api (updateApi) due to test-coroutines-lib migration (I3366d)

Version 1.1.0-beta02

February 23, 2022

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

API Changes

  • Add the ability to specify physical camera ID through
    Camera2Interop. (I5aed8)

Bug Fixes

  • Fixed the stretched preview issue on Oppo Find N (I7d004)
  • Fixed a Galaxy J7 Prime issue that the preview is distorted.
    (I4c500)
  • Use compatible bitrate to find video encoder.
    (d969052)

Version 1.1.0-beta01

January 26, 2022

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

New Features

  • From 1.1.0-beta01, all CameraX libraries will align the same version number. This will help developers track versions much easier and reduce the complexity of large version compatibility matrix.

API Changes

  • Added Camera2CameraControl.clearCaptureRequestOptions for
    clearing the existing capture request options. (Ifa07d)

Bug Fixes

  • Fixed the crash when recording the video on some pre-Android O(API 26) devices. (I88fdf, b/212328261)
  • Fixed the incorrect AF region issue when using cameraControl#startFocusAndMetering() on front lens-facing camera in Samsung devices (Ifbf59, b/210548792)
  • Use torch as flash on Pixel 3a/Pixel 3a XL to improve the speed and the captured image quality in dark (Ib12b6, b/211474332)
  • Enabled applications to resume the camera when camera
    is interrupted by other higher priority application in the
    multi-window mode and the focus changes back to the application.
    Please note that there could be some latency(1 second to 10 seconds or more) between focus changes and camera reopened due to some framework issue. (I4d092)

Version 1.1.0-alpha12

December 15, 2021

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

API Changes

  • Removed unnecessary @RequiresApi(21) annotations from the inner classes/interfaces. (I8e286, b/204917951)
  • The quality constants and fallback strategy constants of QualitySelector have been changed to be represented by class objects. For example, QualitySelector.QUALITY_HD is changed to Quality.HD, and QualitySelector.FALLBACK_STRATEGY_LOWER is changed to the instance returned by FallbackStrategy.lowerQualityOrHigherThan(Quality). The API used to create QualitySelector has been changed to a list-based API. The new API QualitySelector.fromOrderedList(List) will refer to the order of the input quality list instead of the order created by QualitySelector.Procedure. QualitySelector.Procedure class has been removed. (I43343)
  • PendingRecording.withEventListener() was removed and the event listener must now be passed to PendingRecording.start(). This event listener requirement is meant to encourage handling of asynchronous errors that are reported in the VideoRecordEvent.Finalize event. (I1e71d)
  • ActiveRecording has been renamed to Recording to reduce verbosity. (I77ceb)

Bug Fixes

  • Fixed the issue that captured photos in FLASH_AUTO mode is underexposed in dark conditions on Pixel 3a and Pixel 3a XL (I13f19, b/205373142)
  • Always use latest display size to determine the preview Resolution. (I4a694)
  • Filtered out cameras which do not have REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE. Cameras with REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE have the minimal set of capabilities that every camera device supports. Camera without REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE might be a camera to support special functionality and does not support standard color output. CameraX can’t support the Preview, ImageCapture, ImageAnalysis or VideoCapture use cases for those cameras. Therefore, those cameras should be filtered out to prevent incorrect usage. (Ib8cda)
  • CameraSelector#filter no longer throws an IllegalArgumentException when the result set is empty. (I27804)
  • Smarter heuristics are now used to select encoder settings based on OEM specified profiles. (Iaeef0)
  • Fixed Preview will have interlaced color lines after start UHD video recording on Pixel1. (I833c6, b/205340278)

Version 1.1.0-alpha11

November 17, 2021

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

API Changes

  • Added CameraSelector#filter to the public API to filter a list of CameraInfos based on a CameraSelector. (I105d0)
  • Add setOutputImageRotationEnabled API for ImageAnalysis config. User can enable rotation for YUV/RGB image buffer. The rotation degree is a relative rotation calculated based on sensor rotation and target rotation to keep image upfront.

  • Add setOutputImageRotationEnabled API for ImageAnalysis config. User can enable rotation for YUV/RGB image buffer. The rotation degree is a relative rotation calculated based on sensor rotation and target rotation to keep image upfront.

    Add getSensorToBufferTransformMatrix API in ImageInfo. The returned matrix is a mapping from sensor coordinates to buffer coordinates, which is, from the value of CameraCharacteristics.SENSOR_INFO_ACTIVE_ARRAY_SIZE to (0, 0,
    image.getWidth, image.getHeight)
    . The matrix can be used to map the coordinates from one {UseCase} to another. For example, mapping coordinates of the face detected with ImageAnalysis to Preview. (I9ff1e)

  • Added a new API ImageCapture.Builder#setJpegQuality to allow changing the output JPEG image compression quality when taking picture. (I8dcf4)

  • Renamed MediaStoreOutputOptions.getCollection to
    MediaStoreOutputOptions.getCollectionUri. (I16639)

Bug Fixes

  • Fixed the issue where flash being triggered during
    tap-to-focus (startFocusAndMetering) when flash mode is auto or
    always_on in low-light environment. (Id4c11)
  • Disabled HDR+ on Pixel 2 XL / Pixel 3 XL in
    MINIMIZE_LATENCY mode to reduce latency. (Ib6270, b/203505523)

External Contribution

Version 1.1.0-alpha10

October 13, 2021

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

New Features

  • Released androidx.camera:camera-video:1.1.0-alpha10 as the first alpha version for Video officially. There are several known issues to be fixed in the later releases.

API Changes

  • Added @RequiresApi(21) annotation to all CameraX classes
    and dropped minSdkVersion from AndroidManifest.xml. This will allow
    camera-core to be easily integrated into applications that have a
    minSdkVersion less than 21, but want to conditionally use code paths
    that rely on API 21 and higher. For any application with
    minSdkVersion 21 or higher, this change requires no action. (Ie7f2e, b/200599470)

Bug Fixes

  • Throw an InitializationException to make the app be able to gracefully handle the AssertionError happened when creating CameraCharacteristics. (Ibec79)

Version 1.1.0-alpha09

September 29, 2021

androidx.camera:camera-camera2:1.1.0-alpha09, androidx.camera:camera-core:1.1.0-alpha09, and androidx.camera:camera-lifecycle:1.1.0-alpha09 are released. Version 1.1.0-alpha09 contains these commits.

API Changes

  • ExperimentalUseCaseGroup annotation is removed now that the APIs are no longer experimental. (I01ef5)

Bug Fixes

  • Fix the issue where the captured photos are blurred
    in MAXIMIZE_QUALITY mode. (I173a9, b/193823892)
  • Fixed a Samsung Galaxy J5 issue that camera gets stuck after taking pictures with flash on/auto in dark environment (I3aab9)
  • When cropping is needed for ImageCapture, compressing the output cropped image with the specified JPEG quality level according to the set capture mode. If the capture mode is CAPTURE_MODE_MINIMIZE_LATENCY, the JPEG compression quality will be 95. If the capture mode is CAPTURE_MODE_MAXIMIZE_QUALITY, the JPEG compression quality will be 100. (Ieb37c, b/142856426)

Version 1.1.0-alpha08

August 18, 2021

androidx.camera:camera-camera2:1.1.0-alpha08, androidx.camera:camera-core:1.1.0-alpha08, and androidx.camera:camera-lifecycle:1.1.0-alpha08 are released. Version 1.1.0-alpha08 contains these commits.

New Features

  • Add setOutputImageFormat API for image analysis config. User
    can select ImageAnalysis.OUTPUT_IMAGE_FORMAT_YUV_420_888 or
    ImageAnalysis.OUTPUT_IMAGE_FORMAT_RGBA_8888. By default,
    ImageAnalysis.OUTPUT_IMAGE_FORMAT_YUV_420_888 will be selected. (I7902d)

API Changes

  • ExperimentalUseCaseGroupLifecycle annotation is removed now that the APIs are no longer experimental. (I17b85)

Bug Fixes

  • Fixed Preview screen is too bright on the Huawei P20 Lite. This problem only occurs when certain special Preview resolutions are used together with a large zoom in value. (Idefce, b/192129158)
  • Fixed an issue that flash is not working on some devices when setting flash
    mode to FLASH_MODE_ON shortly followed by taking pictures. (Ieb49b)
  • Fixed the issue where Preview will halt for a while when taking pictures if VideoCapture, ImageCapture and Preview are bound. (I56197, b/193864120)
  • Allows ImageAnalysis to select a resolution larger than 1080p. A LIMITED-level above device can support a RECORD size resolution for ImageAnalysis when it is bound together with Preview and ImageCapture. The trade-off is the selected resolution for the ImageCapture will also need to be a RECORD size resolution. To successfully select a RECORD size resolution for ImageAnalysis, a RECORD size target resolution should be set on both ImageCapture and ImageAnalysis. This indicates that the application clearly understands the trade-off and prefers the ImageAnalysis to have a larger resolution rather than the ImageCapture to have a MAXIMUM resolution. For the definitions of RECORD, MAXIMUM sizes and more details see https://developer.android.com/reference/android/hardware/camera2/CameraDevice#regular-capture. The RECORD size refers to the camera device’s maximum supported recording resolution, as determined by CamcorderProfile. The MAXIMUM size refers to the camera device’s maximum output resolution for that format or target from StreamConfigurationMap.getOutputSizes(int). (I1ee97, b/192911449)
  • Add the Exif info to the captured image. (I01ff0, b/193342619)
  • In ImageCapture, return the URI of the saved image if the saving location is File. (Ib5b49, b/149241379)
  • Fixed an issue that captured images with flash is dark on many devices. (I4e510)

Version 1.1.0-alpha07

July 21, 2021

androidx.camera:camera-camera2:1.1.0-alpha07, androidx.camera:camera-core:1.1.0-alpha07, and androidx.camera:camera-lifecycle:1.1.0-alpha07 are released. Version 1.1.0-alpha07 contains these commits.

Bug Fixes

  • Fixed a Samsung Galaxy Note 5 issue that camera gets
    stuck after taking pictures with flash on/auto in dark
    environment (If6871)
  • Fixed YuvToJpegProcessor EOFException issue when extension mode is enabled and ImageCapture#CAPTURE_MODE_MAX_QUALITY mode is set. (I538bd, b/192017012)

Version 1.1.0-alpha06

June 30, 2021

androidx.camera:camera-camera2:1.1.0-alpha06, androidx.camera:camera-core:1.1.0-alpha06, and androidx.camera:camera-lifecycle:1.1.0-alpha06 are released. Version 1.1.0-alpha06 contains these commits.

API Changes

  • Promote the experimental exposure compensation APIs for
    camera-core (I08ee8)
  • Added a API isFocusMeteringSupported in CameraInfo which
    allows applications to check if the given FocusMeteringAction is
    supported on current camera or not. (Ib45ae, b/188606490)
  • Exposed getResolutionInfo API to provide the resolution information for Preview, ImageCapture and ImageAnalysis. (I2b613, b/188600718)
  • Promoted the following experimental APIs to official APIs:
    CameraXConfig.Builder#setAvailableCamerasLimiter(),
    CameraXConfig.Builder#setMinimumLoggingLevel(),
    CameraXconfig.Builder#setSchedulerHandler(),
    CameraXConfig#getAvailableCamerasLimiter(),
    CameraXConfig#getMinimumLoggingLevel(),
    CameraXConfig#getCameraExecutor(),
    CameraXConfig#getSchedulerHandler(). (I2ade2)
  • Exposed the CameraProvider interface to provide access to a set of cameras. (I1a7b1)
  • Promote the experimental UseCaseGroup API for camera-core, camera-lifecycle and camera-video. Added ViewPort#getLayoutDirection, ViewPort.Builder#setLayoutDirection and ViewPort.Builder#setScaleType for customizing viewport. (I7cee8)

Version 1.1.0-alpha05

June 2, 2021

androidx.camera:camera-camera2:1.1.0-alpha05, androidx.camera:camera-core:1.1.0-alpha05, and androidx.camera:camera-lifecycle:1.1.0-alpha05 are released. Version 1.1.0-alpha05 contains these commits.

API Changes

  • Removed Camera2CameraFilter class. Suggest to select camera by
    CameraFilter and retrieve CameraCharacteristics or other Camera2 related
    information through Camera2CameraInfo if needed. (Ib887c)
  • ExperimentalCameraFilter APIs are now out of experimental
    stage and become formal APIs. They can be used without annotated OptIn. (I4bc94)
  • Added camera state API that’s exposed through CameraInfo#getCameraState(). (Ia86b4)
  • Added experimental API CameraInfo#getCameraSelector() which returns a CameraSelector unique to its camera (I77f9f)

Bug Fixes

  • Fixed the issue that ListenableFuture returned in
    setZoomRatio and setLinearZoom cannot complete on some android
    11 devices (I716d7)
  • Speed up Camera switching and reduce the error happen rate of the camera device (I34c99)
  • Replaced ExperimentalUseCaseGroupLifecycle with
    ExperimentalUseCaseGroup. (I3b2ef, b/159033688)

Version 1.1.0-alpha04

April 21, 2021

androidx.camera:camera-camera2:1.1.0-alpha04, androidx.camera:camera-core:1.1.0-alpha04, and androidx.camera:camera-lifecycle:1.1.0-alpha04 are released. Version 1.1.0-alpha04 contains these commits.

Bug Fixes

  • Fixed a memory leak caused by multiple threads concurrently accessing the same collection. The memory leak may cause the Activity or Fragment to be retained by a Preview instance. (I7b4b8)
  • Replaced annotation @Experimental with @RequiresOptIn to experimental APIs. For calling experimental APIs, use androidx.annotation.OptIn instead of deprecated androidx.annotation.experimental.UseExperimental. (Iff226)
  • Fixed ImageCapture with flash On/Auto takes washed out images on Samsung Galaxy S7. (I30001)
  • Added a CameraState API that will be exposed through CameraInfo. (I75392)

Version 1.1.0-alpha03

March 24, 2021

androidx.camera:camera-camera2:1.1.0-alpha03, androidx.camera:camera-core:1.1.0-alpha03, and androidx.camera:camera-lifecycle:1.1.0-alpha03 are released. Version 1.1.0-alpha03 contains these commits.

Bug Fixes

  • Output JPEG format for ImageCapture#OnImageCapturedCallback when Extensions modes is enabled. (I0d7b1)
  • Fixed initialization failure on UMIDIGI BISON devices (I57d9e, b/180818665)
  • Fixed Samsung A3 stretched preview in PreviewView. (Iacb30, b/180121821)

Version 1.1.0-alpha02

February 24, 2021

androidx.camera:camera-camera2:1.1.0-alpha02, androidx.camera:camera-core:1.1.0-alpha02, and androidx.camera:camera-lifecycle:1.1.0-alpha02 are released. Version 1.1.0-alpha02 contains these commits.

API Changes

  • Added an API ProcessCameraProvider.getAvailableCameraInfos() to directly retrieve information about the available cameras, which are either all of the device’s cameras, or those selected by the CameraSelector provided in CameraXConfig.Builder.setAvailableCamerasLimiter(CameraSelector). (Ieac08)

Bug Fixes

  • CameraX now tries to force open a camera on the initial attempt, this may result in CameraX stealing the camera away from other camera clients when its app has a higher priority. (Iab069, b/175820568)
  • Fixed the Robolectric test failure when
    setAvailableCamerasLimiter is used in CameraXConfig. (Ice307)
  • This change catches the exception when the image queue is maxed out in ImageAnalysis. So instead of crashing, you may notice other use cases being frozen or sluggish. e.g. frozen/sluggish preview. (Ic12da, b/175851631)
  • Fixed ExtensionsErrorListener to report errors when only Preview or ImageCapture is bound. (I5ae39)
  • Fixed ImageCapture performance regression by removing the validation of image saved location before taking a picture. After making this change, if the save destination is invalid, it will take longer to get the failure response because it will try to save the image after the photo is taken. (I1fd4e, b/177061560)
  • Fixed ImageCapture performance regression with “File” type OutputFileOptions. (I5164a, b/177061560)
  • Documentation updated to recommend against using
    ProcessCameraProvider.configureInstance(...) from
    library code. (Ib8a9f)

Version 1.1.0-alpha01

January 27, 2021

androidx.camera:camera-camera2:1.1.0-alpha01, androidx.camera:camera-core:1.1.0-alpha01, and androidx.camera:camera-lifecycle:1.1.0-alpha01 are released. Version 1.1.0-alpha01 contains these commits.

Bug Fixes

  • Workaround included for intermittent corrupt image data in JPEGs on SM-G930T back-facing camera. (I52001, b/159831206)
  • Fixed IllegalArgumentException issue that happened when all preview supported sizes are smaller than 640×480 and display size is larger than 640×480. (I2a63c, b/150506192)
  • Resources in libraries with no explicitly declared public resources
    (ex. via public.xml) are now private by default. (Ia1dcc, b/170882230)

Camera-Camera2, Camera-Core, & Camera-Lifecycle Version 1.0.2

Version 1.0.2

September 29, 2021

androidx.camera:camera-camera2:1.0.2, androidx.camera:camera-core:1.0.2, and androidx.camera:camera-lifecycle:1.0.2 are released. Version 1.0.2 contains these commits.

Bug Fixes

  • Fix the issue where the captured photos are blurred
    in MAXIMIZE_QUALITY mode. (I173a9, b/193823892)
  • Fixed a issue that captured image with flash is dark on
    many devices. (I4e510)

Camera-Camera2, Camera-Core, & Camera-Lifecycle Version 1.0.1

Version 1.0.1

July 21, 2021

androidx.camera:camera-camera2:1.0.1, androidx.camera:camera-core:1.0.1, and androidx.camera:camera-lifecycle:1.0.1 are released. Version 1.0.1 contains these commits.

Bug Fixes

  • Fixed the issue that the ListenableFuture returned in
    setZoomRatio and setLinearZoom cannot complete on some android
    11 devices (I716d7)

  • Fixed the issue that the camera gets stuck at closing camera state on some devices and causes black preview. (I34c99)

Camera-Camera2, Camera-Core, & Camera-Lifecycle Version 1.0.0

Note:

Newer versions of AndroidX libraries now correctly reflect implementation dependencies versus api dependencies. If your project relies on an implicit dependency exposed through an implementation dependency in version 1.0.0, you must explicitly depend on that dependency in your build.gradle.

Version 1.0.0

May 5, 2021

androidx.camera:camera-camera2:1.0.0, androidx.camera:camera-core:1.0.0, and androidx.camera:camera-lifecycle:1.0.0 are released. Version 1.0.0 contains these commits.

Major features of 1.0.0

  • CameraX supports Preview, ImageCapture, and Analysis
  • CameraX manages the camera lifecycle within an easy to use API
  • CameraX aims to provide a compatibility layer that fixes many issues in the Android Camera Ecosystem

Known Issues

Version 1.0.0-rc05

April 21, 2021

androidx.camera:camera-camera2:1.0.0-rc05, androidx.camera:camera-core:1.0.0-rc05, and androidx.camera:camera-lifecycle:1.0.0-rc05 are released. Version 1.0.0-rc05 contains these commits.

Bug Fixes

  • Fixed ImageCapture with flash On/Auto takes washed out images on Samsung Galaxy S7. (I30001)

Version 1.0.0-rc04

March 24, 2021

androidx.camera:camera-camera2:1.0.0-rc04, androidx.camera:camera-core:1.0.0-rc04, and androidx.camera:camera-lifecycle:1.0.0-rc04 are released. Version 1.0.0-rc04 contains these commits.

Bug Fixes

Version 1.0.0-rc03

February 24, 2021

androidx.camera:camera-camera2:1.0.0-rc03, androidx.camera:camera-core:1.0.0-rc03, and androidx.camera:camera-lifecycle:1.0.0-rc03 are released. Version 1.0.0-rc03 contains these commits.

Bug Fixes

  • Fix format error in the document of ProcessCameraProvider#getInstance
  • Fixed the Robolectric test failure when setAvailableCamerasLimiter is used in CameraXConfig.
  • Fixed ImageCapture performance regression by removing the validation of image saved location before taking a picture. After making this change, if the save destination is invalid, it will take longer to get the failure response because it will try to save the image after the photo is taken
  • This change catches the exception when the image queue is maxed out in ImageAnalysis. So instead of crash, you may notice other use cases being frozen or sluggish. e.g. frozen/sluggish preview.
  • Workaround included for intermittent corrupt image data in JPEGs on SM-G930T back-facing camera. (I52001, b/159831206)
  • This change catches the exception when the image queue is maxed out in ImageAnalysis. So instead of crashing, you may notice other use cases being frozen or sluggish. e.g. frozen/sluggish preview. (Ic12da, b/175851631)
  • Fixed the Robolectric test failure when
    setAvailableCamerasLimiter is used in CameraXConfig. (Ice307)
  • Fixed ImageCapture performance regression by removing the validation of image saved location before taking a picture. After making this change, if the save destination is invalid, it will take longer to get the failure response because it will try to save the image after the photo is taken. (I1fd4e, b/177061560)
  • Fixed ImageCapture performance regression with “File” type OutputFileOptions. (I5164a, b/177061560)

Version 1.0.0-rc02

January 27, 2021

androidx.camera:camera-camera2:1.0.0-rc02, androidx.camera:camera-core:1.0.0-rc02, and androidx.camera:camera-lifecycle:1.0.0-rc02 are released. Version 1.0.0-rc02 contains these commits.

Bug Fixes

  • Fixed IllegalArgumentException issue happened when all preview supported sizes are smaller than 640×480 and display size is larger than 640×480. (b/150506192)
  • Limit number of camera reopen attempts. While attempting to recover from certains issues when opening the camera, CameraX will no longer attempt to reopen the camera indefinitely, instead it will stop after retrying for 10 seconds.I435d2

  • Fixed IllegalArgumentException issue that happened when all preview supported sizes are smaller than 640×480 and display size is larger than 640×480. (I2a63c, b/150506192)

Version 1.0.0-rc01

December 16, 2020

androidx.camera:camera-camera2:1.0.0-rc01, androidx.camera:camera-core:1.0.0-rc01, and androidx.camera:camera-lifecycle:1.0.0-rc01 are released. Version 1.0.0-rc01 contains these commits.

API Changes

  • Changed CameraFilter and Camera2Filter to take in CameraInfo. (I6883d)
  • Added experimental class Camera2CameraControl to allow interoperating with Camera2 APIs
    dynamically. (I45cf3)
  • Renamed Camera2CameraInfo#fromCameraInfo to #from. (Ia2bd6)
  • Added an experimental setAvailableCamerasLimiter API to
    CameraXConfig to allow apps to optimize the initialization latency
    by avoiding initializing unused cameras. (I6cf88)
  • Added experimental method CameraXConfig.Builder#setMinimumLoggingLevel() to allow setting a minimum logging level for CameraX logs. When not set, it defaults to Log#DEBUG. (Ic3245)

Bug Fixes

  • Workaround included for intermittent corrupt image data in
    JPEGs on SM-G930V back-facing camera. (I5aca5, b/159831206)
  • Fixed the issue that taking pictures doesn’t receive results when flash is always/on
    and the environment is dark on Samsung SM-A716 devices. (If98b2, b/172036589)
  • Fixed the issue that the Preview cannot be stopped by calling Preview.setSurfaceProvider(null). (I3ac18)
  • Fixed orientation issue when capturing 4:3 images on some devices. (I0e3fb, b/171492111)

Camera Camera2, Core, & Lifecycle Version 1.0.0-beta12

November 11, 2020

androidx.camera:camera-camera2:1.0.0-beta12, androidx.camera:camera-core:1.0.0-beta12, and androidx.camera:camera-lifecycle:1.0.0-beta12 are released. Version 1.0.0-beta12 contains these commits.

Bug Fixes

  • Disabled auto flash on Samsung A3 devices to fix the crash
    when taking a photo with auto flash AE mode on Samsung A3 devices. (Ia5fe3, b/157535165)
  • Fixed an issue where the preview was stretched on Nexus 4 devices running Android L (API levels 21 and 22). (I4d407, b/158749159)
  • OnImageCapturedCallback#onCaptureSuccess base class
    implementation no longer closes the image. This is for preventing
    unexpected behavior to developers. Developers should not rely on
    super.onCaptureSuccess to close the image. (Ifbf9c)
  • The androidx variant of the Experimental annotation has been
    deprecated to provide parity with Kotlin. It has been replaced by the
    RequiresOptIn annotation, and the Java-facing linter has been updated to
    support both the new Kotlin annotation and the new androidx variant. (I52495, b/151331381)

Camera-Camera2 Version 1.0.0-beta11

October 14, 2020

androidx.camera:camera-camera2:1.0.0-beta11 is released. Version 1.0.0-beta11 contains these commits.

New Features

  • Supports android 11 CONTROL_ZOOM_RATIO API for zoom on
    android 11 or later devices which contains valid
    CONTROL_ZOOM_RATIO_RANGE. (I62cc6)

Bug Fixes

  • Fixed the NumberFormatException issue happened when the camera Id is a non-integer camera Id. (Ib2228)
  • Improved the latency of CameraX initialization and
    bindToLifecycle (I61dc5)
  • Creation of UseCases do not require initialization of CameraX
    to complete. All implementation specific configurations are set on
    UseCase once it is attached to a Camera instance which for the public
    API is ProcessCameraProvider.bindToLifecycle(). (Ia5411)
  • .getTargetRotation() will return Surface.ROTATION_0
    if called before being attached to a Camera instance unless a
    targetRotation has been set on the Builder or UseCase. (I80fcd)

Camera-Core Version 1.0.0-beta11

October 14, 2020

androidx.camera:camera-core:1.0.0-beta11 is released. Version 1.0.0-beta11 contains these commits.

New Features
– Supports android 11 CONTROL_ZOOM_RATIO API for zoom on
android 11 or later devices which contains valid
CONTROL_ZOOM_RATIO_RANGE. (I62cc6)

Bug Fixes

  • Fixed the NumberFormatException issue happened when the camera Id is a non-integer camera Id. (Ib2228)
  • Creation of UseCases do not require initialization of CameraX
    to complete. All implementation specific configurations are set on
    UseCase once it is attached to a Camera instance which for the public
    API is ProcessCameraProvider.bindToLifecycle(). (Ia5411)
  • .getTargetRotation() will return Surface.ROTATION_0
    if called before being attached to a Camera instance unless a
    targetRotation has been set on the Builder or UseCase. (I80fcd)

Camera-Core Version 1.0.0-beta10

September 23, 2020

androidx.camera:camera-core:1.0.0-beta10 is released. Version 1.0.0-beta10 contains these commits.

Caution:

Please do not use Camera-Core Version 1.0.0-beta09 as there is a Known Issue [See Bug Fixes Below] around image capture. Please do not use this version in your applications. Instead use Camera-Core Version 1.0.0-beta10 and above.

Bug Fixes

  • Fix bug in validating file save destination for image capture (I8c565, b/167697553)

Camera-Camera2 Version 1.0.0-beta10

September 23, 2020

androidx.camera:camera-camera2:1.0.0-beta10 is released. Version 1.0.0-beta10 contains these commits.

Bug Fixes

Camera-Camera2 Version 1.0.0-beta09

September 16, 2020

androidx.camera:camera-camera2:1.0.0-beta09 is released. Version 1.0.0-beta09 contains these commits.

Caution:Camera-Core Version 1.0.0-beta09 as there is a Known Issue around image capture. Please do not use this version in your applications. Instead use

Please do not useas there is a Known Issue around image capture. Please do not use this version in your applications. Instead use Camera-Core Version 1.0.0-beta10 and above.

API Changes

  • Instead of providing static methods, Camera2CameraInfo takes
    in a CameraInfo instance when created to retrieve Camera2 related
    information from. (I5b844)

Bug Fixes

  • Fixed target aspect ratio issue on tablet devices. A 16:9 size should be selected when the target aspect ratio is set as AspectRatio.RATIO_16_9. (Ib7fcf, b/151969438)
  • Throw an InitializationException to make the app be able to gracefully handle the AssertionError happened when creating CameraCharacteristics. (I89c8c, b/160524721)
  • Added experimental interfaces for ExposureCompensation (If96c7)

Camera-Core Version 1.0.0-beta09

September 16, 2020

androidx.camera:camera-core:1.0.0-beta09 is released. Version 1.0.0-beta09 contains these commits.

API Changes

  • fixed the bug where viewport is marked as non-null on UseCaseGroup. Developers should be able to create a viewport without setting a viewport. (Ie3d2e)
  • Added experimental interfaces for ExposureCompensation (If96c7)
  • Allow arbitrary target rotation for Preview. The transformation info is calculated and returned to user on-the-fly via a new TranformationInfoListener callback. (I21470)

Bug Fixes

  • Fixed the issue that flash on some devices would not turn off. It happens when the flash mode is set to FLASH_MODE_ON to take a picture, and is changed to FLASH_MODE_OFF when the flash is fired. The symptom is like torch mode enabled. (Ib4451, b/162568128)
  • Forced PreviewView to use TextureView if extension effect is enabled and the vendor library implementation needs to do a special process on the output surface. (I0c3cc)
  • Fixed the activity/fragment leak when an activity/fragment context is passed to ProcessCameraProvider.getInstance(Context).

Known Issues

  • When ViewPort is set, the crop rect of ImageCapture might be incorrect on devices who rotate the image buffer in HAL. This will be fixed in the next release.

Camera-Camera2 Version 1.0.0-beta08

August 19, 2020

androidx.camera:camera-camera2:1.0.0-beta08 is released. Version 1.0.0-beta08 contains these commits.

Bug Fixes

  • Optimized bindToLifecycle to run quickly on the main thread. (I1d57e)
  • DisplayOrientedMeteringPointFactory takes in a CameraInfo
    instance instead of a CameraSelector so there is a direct mapping to
    which Camera the factory will be generating points for. All classes
    which use DisplayOrientedMeteringPointFactory also take in a CameraInfo
    instance instead of CameraSelector. (I400c1)
  • Fixed auto-resolution aspect ratio size grouping issue that a 16:9 mod16 size (864×480) is selected when the target resolution setting is 2016×1080 and there is another 1920×1080 16:9 size supported. (I53167, b/159363774)
  • Fix the CameraControl issue where it’s unable to work by a race condition (I2279f, b/152333890, b/160714166)

Camera-Core Version 1.0.0-beta08

August 19, 2020

androidx.camera:camera-core:1.0.0-beta08 is released. Version 1.0.0-beta08 contains these commits.

API Changes

  • DisplayOrientedMeteringPointFactory takes in a CameraInfo
    instance instead of a CameraSelector so there is a direct mapping to
    which Camera the factory will be generating points for. All classes
    which use DisplayOrientedMeteringPointFactory also take in a CameraInfo
    instance instead of CameraSelector. (I400c1)

Bug Fixes

  • For image capture, overwrite the flip horizontal flag in metadata based on camera direction. (I28499)
  • Initialization should no longer crash when using a Context
    that does not return an Application object from
    Context.getApplicationContext(). (I3d3c9, b/160817073)

Camera-Camera2 Version 1.0.0-beta07

July 22, 2020

androidx.camera:camera-camera2:1.0.0-beta07 is released. Version 1.0.0-beta07 contains these commits.

Bug Fixes

  • Fixed the issue that the preview is stretched on android 5.0 legacy device. (I0c03a)
  • Excluded some JPEG supported sizes that will cause WYSIWYG issue on some devices. (Ib5128)

Camera-Core Version 1.0.0-beta07

July 22, 2020

androidx.camera:camera-core:1.0.0-beta07 is released. Version 1.0.0-beta07 contains these commits.

API Changes

  • Merge FIT_CENTER, FIT_START, and FIT_END fit style with FIT. FITmeans that the returned crop rect will be the max possible sensor rect. (Ia73c3)
  • Preview’s crop rect is configured by viewport. Only the area covered by the crop rect should be visible to end users. (I142a4)

Bug Fixes

  • Fixed the issue that the preview is stretched on android 5.0 legacy device. (I0c03a)
  • Fixed the ConcurrentModificationException exception
    issue when unbinding use cases. (I371c0)

Camera-Camera2 Version 1.0.0-beta06

June 24, 2020

androidx.camera:camera-camera2:1.0.0-beta06 is released. Version 1.0.0-beta06 contains these commits.

API Changes

  • Added experimental interfaces for filtering cameras by camera
    ID and CameraCharacteristics. (I28f61)

Bug Fixes

  • Fixed the issue where startFocusAndMetering fails to
    focus successfully on Samsung Galaxy S7. (If3be7, b/159039233)
  • Fix the camera can’t be closed after quit the app. (I7a7b3)
  • Fix repeated camera switching breaks preview when using SurfaceView implementation of PreviewView (I920ce)
  • CameraControl#startFocusAndMetering will fail if none of the
    specified MeteringPoint can generate valid metering rectangles. (Id53ce)

Camera-Core Version 1.0.0-beta06

June 24, 2020

androidx.camera:camera-core:1.0.0-beta06 is released. Version 1.0.0-beta06 contains these commits.

API Changes

  • Added experimental interfaces for filtering cameras by camera
    ID and CameraCharacteristics. (I28f61)

Bug Fixes

  • CameraX can now be configured with
    ProcessCameraProvider#configureInstance() before calling
    ProcessCameraProvider#getInstance(). This allows for customization of
    the CameraXConfig without requiring implementing CameraXConfig.Provider
    in the app’s Application class. (Ia1a8d)
  • CameraControl#startFocusAndMetering will fail if none of the
    specified MeteringPoint can generate valid metering rectangles. (Id53ce)

Camera-Camera2 Version 1.0.0-beta05

June 10, 2020

androidx.camera:camera-camera2:1.0.0-beta05 is released. Version 1.0.0-beta05 contains these commits.

Bug Fixes

  • Fix the crash on app startup when initialising CameraX while phone is in Do Not Disturb mode. An InitializationException contains a CameraUnavailableException that will be set to the ListenableFuture of the intialization result instead of crashing the application. (I9909a, b/149413835)
  • Fixed the crash when calling startFocusAndMetering
    on devices that CONTROL_AF_STATE is null. (Ife55e, b/157084254)

Camera-Core Version 1.0.0-beta05

June 10, 2020

androidx.camera:camera-core:1.0.0-beta05 is released. Version 1.0.0-beta05 contains these commits.

API Changes

  • Fix the crash on app startup when initialising CameraX while phone is in Do Not Disturb mode. An InitializationException contains a CameraUnavailableException will be set to the ListenableFuture of the intialization result instead of crashing the application. (I9909a, b/149413835)

Bug Fixes

  • Updated javadocs of setTargetResolution and setTargetRotation. (Iae16f)

Camera-Camera2 Version 1.0.0-beta04

May 27, 2020

androidx.camera:camera-camera2:1.0.0-beta04 is released. Version 1.0.0-beta04 contains these commits.

Bug Fixes

  • Allowed applications to set any camera2 capture request parameters via Camera2Interop without causing a crash. Please note that if there are issues that arise as a result of overriding parameters. Stability and behaviour are not guaranteed when overriding parameters using Camera2Interop. (Ibe5a1, b/149103700)
  • Auto-initialization is fixed when using an app on a device that is using a pseudo-locale. (I3bef3, b/154767663)
  • Converted error log related to detached use case to a debug log on Camera2CameraImpl. (I1a565, b/154422490)
  • Fixed issue where image taken is too dark sometimes even though flash is fired. (I5d9fa, b/149729613)
  • Fix bug where buffer in ImageProxy from ImageCapture was not rewound (I0c455, b/153249512)
  • Fixed the issues where binding ImageCapture only: (1) Failed to take photos with MAX_QUALITY; (2) Generated bad Image quality because auto exposure does not work. (I17782, b/145326998)
  • Improved reliability of re-opening camera when CameraX is disconnected by another process or codepath stealing the camera (I1fbc3, b/153714651)

Camera-Core Version 1.0.0-beta04

May 27, 2020

androidx.camera:camera-core:1.0.0-beta04 is released. Version 1.0.0-beta04 contains these commits.

API Changes

  • Adds an experimental API, CameraXConfig.Builder#setSchedulerHandler() for setting the handler used internally by the CameraX camera stack. This new API along with CameraXConfig.Builder#setCameraExecutor() should allow full control over the threads being used by the CameraX camera stack. (I7bf32, b/121160431)

Bug Fixes

  • Fixes crash in ImageAnalysis where the ImageProxy is accessed after the ImageReaderProxy has been closed. This also makes it so that all ImageProxy received by the Analyzer must be closed before the ImageReaderProxy will be closed. (I4b299, b/145956416, b/154155377, b/156357269)
  • Removed the CameraInfo parameter from PreviewView#createSurfaceProvider(), PreviewView now internally retrieves it from the SurfaceRequest. (If18f0, b/154652477)
  • Auto-initialization is fixed when using an app on a device that is using a pseudo-locale. (I3bef3, b/154767663)
  • Fixed issue where image taken is too dark sometimes even though flash is fired. (I5d9fa, b/149729613)
  • Fix issue with ImageAnalysis where multiple calls to setAnalyzer/clearAnalyzer resulted in the analyzer not receiving images to analyze. (I6169f, b/151605317, b/153514544)
  • Fix bug where buffer in ImageProxy from ImageCapture was not rewound (I0c455, b/153249512)
  • Fixed the issue that the first camera in the supported list from CameraManager is not always selected to use. (I4c624, b/153418028)
  • Fixed intermittent crash caused by setting Preview.SurfaceProvider not releasing the previously requested surface. “java.lang.IllegalStateException: Camera surface session should only fail with request cancellation” (I8e4e7, b/155936225)

Camera-Camera2 Version 1.0.0-beta03

April 15, 2020

androidx.camera:camera-camera2:1.0.0-beta03 is released. Version 1.0.0-beta03 contains these commits.

Bug Fixes

  • Fixes to support the release of camera-core

Camera-Core Version 1.0.0-beta03

April 15, 2020

androidx.camera:camera-core:1.0.0-beta03 is released. Version 1.0.0-beta03 contains these commits.

Bug Fixes

  • Fixed regression from beta03 where calling bindToLifecycle() with zero UseCases would cause a thrown exception. This prevented retrieval of a Camera without binding a UseCase.

Camera-Camera2 Version 1.0.0-beta02

April 1, 2020

androidx.camera:camera-camera2:1.0.0-beta02 is released. Version 1.0.0-beta02 contains these commits.

Bug Fixes

  • Fixed the ImageInfo.getRotationDegrees() from the ImageProxy produced by ImageCapture so that it matches the EXIF orientation rotational value. (Id4281, b/150802561)
  • Explicit ordering of CameraX dependencies within build.gradle is no longer required to use the default CameraX/Camera2 implementation. For cases where declaring strict dependencies is required, all CameraX dependencies can now be included in the build file. (I46e88)
  • Fixed the IllegalArgumentException issue happening on the devices where the display size is smaller than 640×480. (Ife3f2, b/150506192)
  • Fixed bindToLifecycle so that it only modifies the UseCase if it successfully binds. Previously when calling bindToLifecycle in order to do resolution calculations the UseCase is updated. Now it no longer needs to update the UseCase to do the calculations (I78d9e)

Camera-Core Version 1.0.0-beta02

April 1, 2020

androidx.camera:camera-core:1.0.0-beta02 is released. Version 1.0.0-beta02 contains these commits.

Bug Fixes

  • Fixed the ImageInfo.getRotationDegrees() from the ImageProxy produced by ImageCapture so that it matches the EXIF orientation rotational value. (Id4281, b/150802561)
  • Fixed bindToLifecycle so that it only modifies the UseCase if it successfully binds. Previously when calling bindToLifecycle in order to do resolution calculations the UseCase is updated. Now it no longer needs to update the UseCase to do the calculations (I78d9e)
  • Fixed an issue where the Preview use case’s capture session wasn’t being updated when the preview surface changed after calling Preview.setSurfaceProvider() more than once.

Camera-Camera2 Version 1.0.0-beta01

February 26, 2020

androidx.camera:camera-camera2:1.0.0-beta01 is released. Version 1.0.0-beta01 contains these commits.

Bug Fixes

  • Renamed SurfaceRequest.setSurface(Surface) to
    SurfaceRequest.provideSurface(Surface), and
    SurfaceRequest.setWillNotComplete() to
    SurfaceRequest.willNotProvideSurface(). (I224fe)
  • Fixed an issue with the aspect ratio of a saved image not being correct
    after changing the target rotation value using ImageCapture.setTargetRotation(). (I474ea, b/148763432)
  • Fixed initialization of app variants with ProGuard enabled by preserving the
    flag that sets the default CameraXConfig provider. (I2d6c1)

Camera-Core Version 1.0.0-beta01

February 26, 2020

androidx.camera:camera-core:1.0.0-beta01 is released. Version 1.0.0-beta01 contains these commits.

API Changes

  • Replaced the ListenableFuture on
    SurfaceRequest.provideSurface() with an Executor and Callback. This
    simplifies the API by no longer requiring handling of exceptions on
    provideSurface() and enforces that the provideSurface() callback cannot
    be cancelled. This is to prevent crashes on older devices caused by
    prematurely releasing surfaces. The SurfaceRequest.Result object is now used
    for tracking how a SurfaceRequest uses the provided Surface. (I7854b)
  • Renamed SurfaceRequest.setSurface(Surface) to
    SurfaceRequest.provideSurface(Surface) and
    SurfaceRequest.setWillNotComplete() to
    SurfaceRequest.willNotProvideSurface(). (I224fe)

Bug Fixes

  • Fixed an issue with the aspect ratio of a saved image not being correct
    after changing the target rotation value using ImageCapture.setTargetRotation(). (I474ea, b/148763432)
  • Fixed initialization of app variants with ProGuard enabled by preserving the
    flag that sets the default CameraXConfig provider. (I2d6c1)
  • Updated documentation for flash mode APIs to include
    possible values. (I4a3ec)

Camera-Camera2 Version 1.0.0-alpha10

February 10, 2020

androidx.camera:camera-camera2:1.0.0-alpha10 is released. Version 1.0.0-alpha10 contains these commits.

Bug Fixes

  • Improved stability on INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY devices by ensuring Surfaces are only retained for duration of use by Camera2. (I9dac2)
  • Fixed underexposed preview issue on LEGACY devices by adjusting CONTROL_AE_TARGET_FPS_RANGE properly. (1224638)

Camera-Core Version 1.0.0-alpha10

February 10, 2020

androidx.camera:camera-core:1.0.0-alpha10 is released. Version 1.0.0-alpha10 contains these commits.

API Changes

  • Updated ImageCapture to allow saving images to Uri and OutputStream. Combined overloaded takePicture methods into one. Updated test app to use Uri as the canonical example. (Ia3bec)
  • Preview.PreviewSurfaceProvider has been renamed to Preview.SurfaceProvider. SurfaceProviders no longer require developers to create their own ListenableFuture, and providing a Surface is now done through a new SurfaceRequest object. The Preview.getPreviewSurfaceProvider() method has been removed due to its potential for misuse when Preview is paired with other classes such as PreviewView. (I20105)
  • Added getTargetRotation() and getTargetName() to Preview. (Iceee7)
  • Added getTargetRotation(), getBackpressureStrategy(), and getImageQueueDepth() in ImageAnalysis. (I9d6d9)
  • Added getTargetRotation() and getCaptureMode() in ImageCapture() (I5bc17)
  • The arguments that were previously passed in ImageCapture.OnImageSavedCallback.onError() and ImageCapture.OnImageCapturedCallback.onError() have now been replaced by a single argument ImageCaptureException, which still contains all the information that was previously passed.
  • The file argument previously passed in ImageCapture.OnImageSavedCallback.onImageSaved() has been removed. (I750d2)
  • Preview and ImageCapture classes are now marked final. (I2500b)
  • API updated, with getZoomRatio(), getMaxZoomRatio(),
    getMinZoomRatio(), and getLinearZoom() methods of CameraInfo merging
    into getZoomState() which returns a ZoomState instance. (Ib19fe)
  • Removed API fields OPTION_TARGET_CLASS and OPTION_TARGET_NAME
    from CameraXConfig as they are intended for internal library use only.
    Removed constructor for CameraXConfig.Builder. (I96912)
  • Removed requirement that app must extend Application in order
    to initialize CameraX. CameraX will now be initialized with a default
    Camera2 configuration as long as the camera-camera2 artifact is included
    in the application’s build.gradle. (I58ff5) (b/146923574)

Camera-Camera2 Version 1.0.0-alpha09

January 22, 2020

androidx.camera:camera-camera2:1.0.0-alpha09 is released. Version 1.0.0-alpha09 contains these commits.

API changes

  • Add camera2 interop path for extracting a Camera2 camera ID. You can extract
    the camera ID from CameraInfo using Camera2CameraInfo.extractCameraId().
    The following code sample shows how to use this:

    Camera camera = provider.bindToLifecycle(...);
    String cameraId =
        Camera2CameraInfo.extractCameraId(camera.getCameraInfo());
    

    The Camera2CameraInfo class requires the ExperimentalCamera2Interop
    markerClass.

Camera-Core Version 1.0.0-alpha09

January 22, 2020

androidx.camera:camera-core:1.0.0-alpha09 is released. Version 1.0.0-alpha09 contains these commits.

API changes

  • The SurfaceOrientedMeteringPointFactory parameter useCaseForSurface was
    renamed to useCaseForAspectRatio and the reference documentation was
    expanded.
  • FocusMeteringAction.Builder.from() methods are replaced by the constructors
    FocusMeteringAction.Builder().
  • Removed
    DisplayOrientedMeteringPointFactory(android.content.Context, androidx.camera.core.CameraSelector, float, float).
    Applications should use the constructor that takes a Display parameter and
    pass in the current display.
  • Javadoc improvements for focus and metering APIs regarding MeteringMode and
    3A Flags, and usage of Display parameter.
  • Expanded the reference documentation for setZoomRatio and setLinearZoom.

Bug fixes

  • Fixed issues when closing then opening cameras resulting in “Precondition”
    check failure.
  • Fixed a ConcurrentModificationException that could occur when using torch
    and zoom APIs.
  • Fixed issue to now select resolutions closer to requested resolution when a
    mod16 dimensions size is available.
  • startFocusMetering and cancelFocusMetering APIs now behave as documented,
    with correct timing and potentially returning errors when they occur.
  • Fixed issue when a specific target resolution was requested with a crop aspect
    ratio on a device that doesn’t support such sizes. Now, a non-cropped size of
    sufficient resolution to bound the original request will be selected when
    available.

Camera-Camera2 Version 1.0.0-alpha08

December 18, 2019

androidx.camera:camera-camera2:1.0.0-alpha08 is released. Version 1.0.0-alpha08 contains these commits.

Known Issues

  • Not all Camera2 capture request options work when using the Camera2 interop. If the requested option is not supported, the session fails to start and an error like this may occur: 09-09 14:04:13.643 10117 26020 26036 E AndroidRuntime: java.lang.IllegalArgumentException: Unsupported session configuration combination

Bug Fixes

  • Fixed an issue in which a preview black screen occurred after rotating or switching the camera for API Levels 21 and 22.

API Changes

  • Experimental: Added a camera2 interop path for extracting the Camera ID.

Camera-Core Version 1.0.0-alpha08

December 18, 2019

androidx.camera:camera-core:1.0.0-alpha08 is released. Version 1.0.0-alpha08 contains these commits.

Known Issues

  • Apps using the PreviewView or CameraView may have the wrong aspect ratio preview. This happens after pause or resume on some FULL devices, such as the Pixel2.

Bug Fixes

  • Updated the documentation for FocusMeteringAction and CameraControl.
  • Implemented TorchControl for enableTorch() and getTorchState().

API Changes

  • Hid IntDefs and moved IntDef constants outside of the IntDef definition.
  • Moved rotationDegrees from class OnImageCaptureCallback to ImageInfo.
  • Moved rotationDegrees from class Analyzer to ImageInfo.

Camera-Camera2 Version 1.0.0-alpha07

December 4, 2019

androidx.camera:camera-camera2:1.0.0-alpha07 is released. Version 1.0.0-alpha07 of camera-camera2 contains these commits

  • Camera2Config is now available for use with initializing and configuring a Camera2-based implementation for CameraX. More details on how to use this in initialization are in the camera-core section of the release notes.
  • The camera2 interop functionally is now marked as experimental and moved to a separate package, androidx.camera.camera2.interop.

Camera-Core Version 1.0.0-alpha07

December 4, 2019

androidx.camera:camera-core:1.0.0-alpha07 is released. Version 1.0.0-alpha07 of camera-core contains these commits

Note that there are some substantial changes in this Alpha release as we prepare for Beta. We recommend you review the changes and share any feedback you may have on the CameraX Google group. For those developers using CameraX in apps that are on the Play store, we recommend waiting for the formal Beta release before upgrading the library within your applications.

API changes

  • Important: CameraX initialization has changed. Applications should implement CameraXConfig.Provider, and use the default Camera2Config provided by androidx.camera.camera2. A typical usage is:

    import androidx.camera.camera2.Camera2Config
    import androidx.camera.core.CameraXConfig
    
    public class MyCameraXApplication : Application(),  CameraXConfig.Provider {
        override fun getCameraXConfig(): CameraXConfig {
                return Camera2Config.defaultConfig(this)
        }
    }
    
  • The CameraX class has been removed. The bindToLifecycle(), unbind(), unbindAll(), isBound(), and hasCamera() previously provided by the CameraX class call are now available via the ProcessCameraProvider.

  • A per-process instance of ProcessCameraProvider is obtained asynchronously using the static method ProcessCameraProvider.getInstance(), which returns a listenable future, which provides the ProcessCameraProvider on completion.
    Here it is shown in onCreate() for a typical usage. You can place calls to getInstance() later in the activity’s lifecycle to defer initialization latency to a later time (such as when a user action opens a camera UI).

    import androidx.camera.lifecycle.ProcessCameraProvider
    import com.google.common.util.concurrent.ListenableFuture
    
    class MainActivity : AppCompatActivity() {
       private lateinit var cameraProviderFuture : ListenableFuture
       override fun onCreate(savedInstanceState: Bundle?) {
           cameraProviderFuture = ProcessCameraProvider.getInstance(this);
      }
    
  • A listener can be added to the ListenableFuture returned by getInstance(). This ensures the camera provider can be retrieved from the Future without blocking on Future.get()

    cameraProviderFuture.addListener(Runnable {
      val cameraProvider = cameraProviderFuture.get()
      cameraProvider.bindToLifecycle(...)
    }, ContextCompat.getMainExecutor(this))
    
  • Camera selection is now done by a camera selector, instead of per-use case

    val cameraSelector = CameraSelector.Builder().requireLensFacing(LensFacing.BACK).build()
    
  • CameraProvider.bindToLifecycle is given the lifecycle owner, the camera selector, and use cases, which are then bound to the given lifecycle owner and run for the selected camera.

    cameraProvider.bindToLifecycle(this as LifecycleOwner,
           cameraSelector, preview, imageAnalysis)
    
  • Use case “Config” classes are removed. Instead, build use cases directly, setting options on each use case builder. For example:

    preview = Preview.Builder().setTargetAspectRatio(AspectRatio.RATIO_16_9).build()
    
  • The Preview use case has been updated to accept a surface created and managed by the application to ensure Android best practices. It is highly recommended to use the PreviewView view class provided in the camera-view package.

    preview.setPreviewSurfaceProvider(previewView.previewSurfaceProvider)
    
  • See documentation for attaching an app-managed surface. In these cases the app manages the lifecycle of the surface.

  • Important: The ImageAnalysis Analyzer method implementation must call image.close() on received images when finished using them. Otherwise, new images may not be received or the camera may stall, depending on back pressure setting. Refer to the reference docs for details.

  • ImageAnalysis ImageReaderMode is now changed to a backpressure strategy intdef.

  • ImageProxy.getImage() is marked as experimental. Applications should annotate usage for example via @androidx.camera.core.ExperimentalGetImage

  • The UIThread annotation requirement for the Analyzer has been removed.

  • The ImageAnalysis.clearAnalyzer() function is added for removing an analyzer.

  • Listeners with more than 1 method have been renamed to Callback:

    • ImageCapture.OnImageCapturedListener is now ImageCapture.OnImageCapturedCallback
    • ImageCapture.OnImageSavedListener is now ImageCapture.OnImageSavedCallback
    • VideoCapture.OnVideoSavedListener is now VideoCapture.OnVideoSavedCallback
  • Enums have changed to IntDef

  • Zoom controls have been added:

    • CameraControl.setLinearZoom()
    • CameraControl.setZoomRatio()
    • CameraInfo.getLinearZoom()
    • CameraInfo.getMaxZoomRatio()
    • CameraInfo.getZoomRatio()
  • CameraInfo.hasFlashUnit() is added to determine if flash/torch hardware is present.

  • CameraInfo.isFlashAvailable() has been removed. Torch overrides flash functionality. More detail is included in the reference documentation.

  • ImageCapture.Metadata fields are replaced by get/set/is accessors.

  • startFocusMetering and cancelFocusMetering now return ListenableFutures which represent the asynchronous operation of the call.

  • MeteringPoints are now functioning as handles to metering actions, and are produced by factories. Apps should use the existing factories rather than custom factories.

Fixed issues

  • Fixed issue when taking a picture on resuming (after a previous pause had take pictures pending completion).
  • Known Issue: CameraControl.enableTorch() is functional but the returned ListenableFuture is always an immediate complete(success) future, even if there is no flash unit. Future versions will fix this to the final behavior: When there is no flash unit, enableTorch(true) fails immediately (won’t send request to CaptureSession), and TorchState remain Off.
  • Known Issue: startFocusAndMetering and cancelFocusAndMetering start and cancel focus metering, but return an immediately completed (success) future not representing the documented behavior. The FocusMeteringResult from ListenableFuture CameraControl.startFocusAndMetering() is a fake result which isFocusSuccessful() and is always “false,” differing from intended, documented behavior.
  • Known Issue: A metering point factory for use with PreviewView touch events is being developed. For now, apps connecting custom managed surfaces can use the existing metering point factories, and otherwise no touch focus functionality is available for PreviewView.

Camera-Camera2 and Camera-Core Version 1.0.0-alpha06

October 9, 2019

androidx.camera:camera-camera2:1.0.0-alpha06 and androidx.camera:camera-core:1.0.0-alpha06 are released. These are the commits included in camera-camera2:1.0.0-alpha06 and these are the commits included in camera-core:1.0.0-alpha06.

New features

Changes to setting aspect ratios:

  • setTargetAspectRatioMode() was added and accepts an enum argument. This sets the Aspect Ratio Mode with options RATIO_4_3 or RATIO_16_9 instead of an arbitrary aspect ratio. This closer reflects the fact that only certain aspect ratios are provided from the camera, rather than any arbitrary ratio.
    • Currently, the only available ratios are 16:9 and 4:3. In the case of 1:1, only certain devices have this available from the camera, and then only at limited resolutions. Applications designing a 1:1 interface or processing should use the more flexible 16:9 or 4:3 choices and crop the display or process a subregion.
    • These aspect ratios are oriented to use the maximum sensor area.
  • getTargetAspectRatio() was added to use case config APIs, returning the aspect ratio the use case output is targeted for.
  • The method setTargetAspectRatio(Rational aspectRatio) has been changed for ImageCapture to setTargetAspectRatioCustom(Rational aspectRatio). When set, the ImageCapture output crops accordingly.

Executor APIs

  • The following functions accept an executor parameter, which allows the app to control which executor the function runs on.
    • Preview.setOnPreviewOutputUpdateListener() API. If the executor is not present for that function, it executes on the main thread.
    • Preview.setOnPreviewOutputUpdateListener
    • FocusMeteringAction.Builder.setAutoFocusCallback
    • ImageAnalysis.setAnalyzer
    • ImageCapture.takePicture
    • CameraView.takePicture
    • CameraView.startRecording
    • VideoCapture.startRecording

CameraInfo added with check Flash Available and Sensor Rotation APIs

  • Added CameraInfo and a getCameraInfo method, which allows apps to check if a lens facing CameraInfo is available and if a flash is available on that camera. For example:

    try {
        CameraInfo cameraInfo = CameraX.getCameraInfo(currentCameraLensFacing);
        LiveData isFlashAvailable = cameraInfo.isFlashAvailable();
        flashToggle.setVisibility(isFlashAvailable.getValue() ? View.VISIBLE : View.INVISIBLE);
    } catch (CameraInfoUnavailableException e) {
        Log.w(TAG, "Cannot get flash available information", e);
        flashToggle.setVisibility(View.VISIBLE);
    }
    
  • CameraInfo.getSensorRotationDegrees() was added. It provides the camera sensor orientation relative to the device’s natural orientation, or for convenience, relative to an orientation described by a Surface rotation (which describes an orientation relative to natural orientation).

API changes and bug fixes

  • Aspect Ratios: For each use case, applications should call only one of setTargetResolution() or setTargetAspectRatio(). Calling both on the same builder returns an error.
    • In general it’s recommended to use setTargetAspectRatio() based on the application’s UI design. Specific resolutions are based on the use case. For example, preview is near screen resolutions and image capture provides high resolution stills. See the automatic resolutions table for more information.
    • Use setTargetResolution() for more specific cases, such as when minimum (to save computation) or maximum resolutions (for processing details) are required.
  • Executor API: Removed the setCallbackHandler() call from use case configuration APIs. Instead, applications can set the executor as a parameter in various other APIs that set a callback.
  • Updated null annotations for various functions.
  • Fixed an issue that caused java.lang.IllegalStateException at Camera$StateCallback.onError to be thrown when opening the camera.
  • Fixed issue where resolutions would be selected that were too small (less than 640×480) when app is requesting larger or default resolutions resulting in a blocky or blurry preview image. Applications that specifically need smaller resolutions can explicitly request them.
  • Fixed an issue where the camera would show black screen (failed to start the camera) after returning from an intent that launched another camera application.
  • Fixed a bug that threw the following error when apps are repeatedly started or stopped; java.lang.IllegalArgumentException: CaptureRequest contains unconfigured Input/Output Surface!
  • Fixed the following error that occurs when disabling ImageAnalysis: java.lang.IllegalStateException: maxImages (4) has already been acquired, call #close before acquiring more.
  • Added additional tests for camera disconnect flow.
  • Improved test system robustness when running back-to-back camera tests.

Camera-Camera2 and Camera-Core Version 1.0.0-alpha05

September 5, 2019

androidx.camera:camera-camera2:1.0.0-alpha05 and androidx.camera:camera-core:1.0.0-alpha05 are released. These are the commits included in camera-camera2:1.0.0-alpha05 and these are the commits included camera-core:1.0.0-alpha05.

  • API Change: Renamed use case error variables:

    • ImageCapture.UseCaseError is renamed ImageCapture.ImageCaptureError
    • VideoCapture.UseCaseError is renamed VideoCapture.VideoCaptureError
  • Added CameraControl API w/Tap-to-Focus APIs

    • Added API to get a CameraControl from CameraX for a camera, selected by lens facing:

      CameraX.getCameraControl(LensFacing lensFacing)

    • Added MeteringPointFactory, MeteringPoint, MeteringMode, and FocusMeteringAction to run Tap-to-Focus:

      MeteringPointFactory factory = new SensorOrientedMeteringPointFactory(width, height);
      MeteringPoint point = factory.createPoint(x, y);
      FocusMeteringAction action = FocusMeteringAction.Builder.from(point,
                                       MeteringMode.AF_ONLY)
          .addPoint(point2, MeteringMode.AE_ONLY) // could have many
          .setAutoFocusCallback(new OnAutoFocusListener(){
              public void onFocusCompleted(boolean isSuccess) {
              }
          })
          // auto calling cancelFocusAndMetering in 5 sec.
          .setAutoCancelDuration(5, TimeUnit.Second)
          .build();
      
    • Added API for CameraControl to start and cancel focus metering:

      getCameraControl(lensFacing).startFocusAndMetering(action);
      getCameraControl(lensFacing).cancelFocusAndMetering();

    • Added APIs for Metering Point Factories that assist translating tap coordinates to sensor coordinates, based on view classes:

      MeteringPointFactory factory = new TextureViewMeteringPointFactory(textureView);
      MeteringPointFactory factory = new DisplayOrientedMeteringPointFactory(context, lensFacing, viewWidth, viewHeight);

  • Enforce calling the following methods on the Main (UI) thread, throwing an
    IllegalStateException when they are not. Future versions will allow usage on
    other threads and ensure serialization.

    • CameraX.bindToLifecycle()
    • CameraX.unbind()
    • CameraX.unbindAll()
    • ImageAnalysis.setAnalyzer()
    • ImageAnalysis.getAnalyzer()
    • ImageAnalysis.removeAnalyzer()
    • Preview.removePreviewOutputListener()
    • Preview.getOnPreviewOutputUpdateListener()
    • Preview.setOnPreviewOutputUpdateListener()
  • Various config settings now accept null parameters and corresponding getters may return null.

  • Fixed issue when testing on emulators that do not support AF/AE/AWB settings.

  • Fixed crash bug on rotation while analyzing image.

  • Fixed bug where preview appears black on start (no camera data), after rotation or switching between front and back cameras.

  • Removed testing for multiple concurrent image analysis use cases. To ensure compatibility, applications should only attach a single image analysis use case.

  • Added initial robolectric tests for fake camera in camera-testing suite (WIP).

  • Camera2Inititalizer test removed, as its coverage was unclear/misleading.

Camera-Camera2 and Camera-Core Version 1.0.0-alpha04

August 7, 2019

androidx.camera:camera-camera2:1.0.0-alpha04 and androidx.camera:camera-core:1.0.0-alpha04 are released. Version 1.0.0-alpha04 contains these commits.

Note:

This version is dependent on the Java 8 programming language. Please read Use Java 8 language features to learn how to use it in your project.

New Features

Changes to Aspect Ratio and Resolution selection

CameraX’s goal is to successfully initialize a camera session. This means CameraX compromises on resolution/aspect ratios based on device capability, in order to start a capture session as its first goal, and so exact requests may not be honored. This may be due to:

  • Devices not supporting the requested resolution
  • Compatibility issues such as on LEGACY devices where certain resolutions must be used to operate correctly
  • On some devices, certain formats are only available at certain aspect ratios
  • A preference for a “nearest mod16” for JPEG or video encoding. See CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP

Although CameraX creates and manages the session, you should always check
the returned image sizes on the use case output in your code and adjust
accordingly.

Some changes have been made for setting resolutions and aspect ratios, intended to make the API more clear:

  • Preview use case is now considered to have a default 4:3 aspect ratio when none is set.
  • When CameraX internally considers changes to requested resolutions and aspect ratios based on device capability, it first tries to maintain the same aspect ratio (as determined by any of setTargetAspectRatio or setTargetResolution calls)
  • A “Nearest mod16” version of the resolution is considered as the same aspect ratio.

ImageAnalysis Non-Blocking Mode

  • The behaviour of ImageReaderMode.ACQUIRE_LATEST_IMAGE is now non-blocking. It acquires the latest image in the queue, but discards unused images continuously to allow the camera pipeline to avoid blocking.
  • The analyzer can hold a single image indefinitely without stalling the pipeline.
  • If the application provides an executor which then blocks, the ImageAnalysis use case blocks.
  • The default executor set internally behaves as a non-blocking executor.

Bug Fixes

  • Fixed timeout issues waiting for 3A convergence when capturing images on devices with no auto-focus, auto exposure, and auto-whitebalance
  • Fixed issue when rapidly taking pictures with ImageCapture. Fixes error: java.lang.IllegalStateException: maxImages (2) has already been acquired
  • Fixed issue when setLensFacing was not called for a use case, resulting in java.lang.IllegalArgumentException: Unable to get camera ID for use case.
  • Fixed issue where LEGACY device required specific aspect ratio as maximum JPEG resolution
  • Fixed issue when backgrounding the app while camera is opening
  • Fixed issue on API < 25, removing error checkAndUpdateEglState: invalid current EGLDisplay
  • Fixed issue when unbinding preview after enabling and starting extensions
  • Build artifacts for camera-view and camera-extensions are now published as alpha versions

Camera-Camera2 and Camera-Core Version 1.0.0-alpha03

July 2, 2019

androidx.camera:camera-core:1.0.0-alpha03 and androidx.camera:camera-camera2:1.0.0-alpha03 are released. Version 1.0.0-alpha03 contains these commits.

Note:

This version is dependent on the Java 8 programming language. Please read Use Java 8 language features to learn how to use it in your project.

API Changes

  • Added javadoc clarification for “target” in setTarget configuration calls

Camera-Core

  • Fixed unconfigured Input/Output Surface crash on rapid open/close or bind/unbind
  • Move to new Futures implementations
  • Test fixes for more robust testing
  • Core integration test now shows capture time for photos
  • Developed internal compat class for Executors
  • Timing test app capture images waits for previous to complete & improved stability

Extensions

  • Added versioning checks
  • Additional test coverage – extension event callbacks
  • Improvements for internally corresponding image and meta-data
  • Fixes to mode switching in test app

Camera-Camera2 and Camera-Core Version 1.0.0-alpha02

June 5, 2019

androidx.camera:camera-core:1.0.0-alpha02 and androidx.camera:camera-camera2:1.0.0-alpha02 are released. Version 1.0.0-alpha02 contains these commits.

Bug fixes

  • Fixed div by zero issue when using emulator
  • Fixed NullPointerException/Surface Abandoned error occurring on some devices when quickly taking photos while unbinding and rebinding use cases rapidly.
  • Fixed internal issue to ensure capture request updates affect all surfaces consistently
  • Stability improvements when restarting use cases in new app instances
  • Internal architecture changes to prepare for supporting executors in the API
  • Additional Javadoc clarifications on CameraX class and lifecycle management
  • Added instrumented testing for Antelope performance test app
  • Remove need for ‘-keepattributes Signature’ in app Proguard config

Camera-Camera2 and Camera-Core 1.0.0-alpha01

May 7, 2019

androidx.camera:camera-core:1.0.0-alpha01 and
androidx.camera:camera-camera2:1.0.0-alpha01 are released. Version 1.0.0-alpha01 contains these commits.

Camera-Lifecycle Version 1.0.0-beta11

October 14, 2020

androidx.camera:camera-lifecycle:1.0.0-beta11 is released. Version 1.0.0-beta11 contains these commits.

Bug Fixes

  • .getTargetRotation() will return Surface.ROTATION_0
    if called before being attached to a Camera instance unless a
    targetRotation has been set on the Builder or UseCase. (I80fcd)

Camera-Lifecycle Version 1.0.0-beta10

September 23, 2020

androidx.camera:camera-lifecycle:1.0.0-beta10 is released. Version 1.0.0-beta10 contains these commits.

Bug Fixes

Camera-Lifecycle Version 1.0.0-beta09

September 16, 2020

androidx.camera:camera-lifecycle:1.0.0-beta09 is released. Version 1.0.0-beta09 contains these commits.

Camera-Lifecycle Version 1.0.0-beta08

August 19, 2020

androidx.camera:camera-lifecycle:1.0.0-beta08 is released. Version 1.0.0-beta08 contains these commits.

Bug Fixes

  • Initialization should no longer crash when using a Context
    that does not return an Application object from
    Context.getApplicationContext(). (I3d3c9, b/160817073)

Camera-Lifecycle Version 1.0.0-beta07

July 22, 2020

androidx.camera:camera-lifecycle:1.0.0-beta07 is released. Version 1.0.0-beta07 contains these commits.

Camera-Lifecycle Version 1.0.0-beta06

June 24, 2020

androidx.camera:camera-lifecycle:1.0.0-beta06 is released. Version 1.0.0-beta06 contains these commits.

API Changes

  • CameraX can now be configured with
    ProcessCameraProvider#configureInstance() before calling
    ProcessCameraProvider#getInstance(). This allows for customization of
    the CameraXConfig without requiring implementing CameraXConfig.Provider
    in the app’s Application class. (Ia1a8d)

Camera-Lifecycle Version 1.0.0-beta05

June 10, 2020

androidx.camera:camera-lifecycle:1.0.0-beta05 is released. Version 1.0.0-beta05 contains these commits.

Bug Fixes

  • Fix the crash on app startup when initialising CameraX while phone is in Do Not Disturb mode. An InitializationException contains a CameraUnavailableException will be set to the ListenableFuture of the intialization result instead of crashing the application. (I9909a, b/149413835)

Camera-Lifecycle Version 1.0.0-beta04

May 27, 2020

androidx.camera:camera-lifecycle:1.0.0-beta04 is released. Version 1.0.0-beta04 contains these commits.

Camera-Lifecycle Version 1.0.0-beta03

April 15, 2020

androidx.camera:camera-lifecycle:1.0.0-beta03 is released. Version 1.0.0-beta03 contains these commits.

Bug Fixes

  • Fixed regression from beta03 where calling bindToLifecycle() with zero UseCases would cause a thrown exception. This prevented retrieval of a Camera without binding a UseCase.
  • Fixes to support the release of camera-core

Camera-Lifecycle Version 1.0.0-beta01

February 26, 2020

androidx.camera:camera-lifecycle:1.0.0-beta01 is released. Version 1.0.0-beta01 contains these commits.

Bug Fixes

  • Fixed documentation to note that when obtaining a
    ProcessCameraProvider during initialization, a default configuration is
    used and that extending Application is optional. (I5e395)

Camera-Lifecycle Version 1.0.0-beta02

April 1, 2020

androidx.camera:camera-lifecycle:1.0.0-beta02 is released. Version 1.0.0-beta02 contains these commits.

Bug Fixes

  • Updated to support the bug fixes in the camera-camera2:1.0.0-beta02 and camera-core:1.0.0-beta02 artifacts.

Camera-Lifecycle Version 1.0.0-alpha10

February 10, 2020

androidx.camera:camera-lifecycle:1.0.0-alpha10 is released. Version 1.0.0-alpha10 contains these commits.

API Changes

  • Added @MainThread annotation to BindToLifecycle, unbind and unbindAll methods. (I990d2)

Camera-Lifecycle Version 1.0.0-alpha03

January 22, 2020

androidx.camera:camera-lifecycle:1.0.0-alpha03 is released. Version 1.0.0-alpha03 contains these commits.

Updates

  • Various fixes and updates to support Camera Core & Camera2 changes.

Camera-Lifecycle Version 1.0.0-alpha02

December 18, 2019

androidx.camera:camera-lifecycle:1.0.0-alpha02 is released. Version 1.0.0-alpha02 contains these commits.

Dependency changes

  • Updated to use androidx.camera:camera-core:1.0.0-alpha08.

Camera-Lifecycle Version 1.0.0-alpha01

December 4, 2019

androidx.camera:camera-lifecycle:1.0.0-alpha01 is released. Version 1.0.0-alpha01 of camera-lifecycle contains these commits

API notes

  • The camera-lifecycle artifact is added, providing LifeCycleCameraProvider interface, and an implementation called ProcessCameraProvider which provides many of the functions of the previous CameraX class in core and is obtained via a getInstance() method.
  • Apps should include the camera-lifecycle library to use CameraX.
  • See notes in the camera-core section for how to perform initialization of CameraX using a ProcessCameraProvider.

Camera-Extensions and Camera-View Version 1.0.0

Version 1.0.0-alpha32

December 15, 2021

androidx.camera:camera-extensions:1.0.0-alpha32 and androidx.camera:camera-view:1.0.0-alpha32 are released. Version 1.0.0-alpha32 contains these commits.

API Changes

  • Removed unnecessary @RequiresApi(21) annotations from the inner classes/interfaces. (I8e286, b/204917951)
  • Update api files for camera-extensions artifact. (If683a, b/161377155)

Bug Fixes

  • Disallow the app to enable extension modes when binding VideoCapture. CameraX Extensions only support ImageCapture and Preview. The VideoCapture can’t be supported yet. If the app binds VideoCapture and enables any extension mode, an IllegalArgumentException will be thrown. (I0d87b)
  • CameraSelector#filter no longer throws an IllegalArgumentException when the result set is empty. (I27804)
  • Renamed ExtensionsManager#getInstance API as getInstanceAsync because it returns ListenableFuture. The Async suffix of the function name can clearly present that it is an async function. (I279d2)
  • Remove resolution parameter from the ExtensionsManager#getEstimatedCaptureLatencyRange API since users can’t know which sizes are supported for the ImageCapture use case and can’t distinguish whether the returned latency information is for the maximum capture output size or the input resolution parameter. (I74bb2)
  • Move CameraProvider parameter of ExtensionsManager functions to the getInstance() API. So that the users don’t need to input the CameraProvider parameter each time when calling the ExtensionsManager functions. (Ic7e48)

Version 1.0.0-alpha31

November 17, 2021

androidx.camera:camera-extensions:1.0.0-alpha31 and androidx.camera:camera-view:1.0.0-alpha31 are released. Version 1.0.0-alpha31 contains these commits.

API Changes

  • Added CameraSelector#filter to the public API to filter a list of CameraInfos based on a CameraSelector. (I105d0)

Bug Fixes

  • Fixed a crash when switching extensions mode quickly on certain devices.
    (Iebbef)

Version 1.0.0-alpha30

October 13, 2021

androidx.camera:camera-extensions:1.0.0-alpha30 and androidx.camera:camera-view:1.0.0-alpha30 are released. Version 1.0.0-alpha30 contains these commits.

API Changes

  • Added @RequiresApi(21) annotation to all CameraX classes
    and dropped minSdkVersion from AndroidManifest.xml. This will allow
    camera-core to be easily integrated into applications that have a
    minSdkVersion less than 21, but want to conditionally use code paths
    that rely on API 21 and higher. For any application with
    minSdkVersion 21 or higher, this change requires no action. (Ie7f2e, b/200599470)

Bug Fixes

  • Fixed the AbstractMethodError issue which happens when proguard is enabled. (Iae468, b/201177844)

Version 1.0.0-alpha29

September 29, 2021

androidx.camera:camera-extensions:1.0.0-alpha29 and androidx.camera:camera-view:1.0.0-alpha29 are released. Version 1.0.0-alpha29 contains these commits.

API Changes

  • ExperimentalUseCaseGroup annotation is removed now that the APIs are no longer experimental. (I01ef5)
  • remove RotationProvider#removeAllListeners(). Please use RotationProvider#removeListener(...) instead. (Id9d4a)
  • Updated the RotationReceiver class: changed set/clear Listener to add/remove/removeAll, remove the setListener variation that uses the main thread by default and added annotation of methods. (Ib1669)

Bug Fixes

  • Renamed ExtensionMode#BEAUTY to FACE_RETOUCH to correctly present what is done by the extension mode. (I61f54, b/198515274)
  • Fixed the issue that camera is closed unexpectedly when multiple CameraController and PreviewView are used in one Activity. (Ibfd18, b/197539358)

Version 1.0.0-alpha28

August 18, 2021

androidx.camera:camera-extensions:1.0.0-alpha28 and androidx.camera:camera-view:1.0.0-alpha28 are released. Version 1.0.0-alpha28 contains these commits.

API Changes

  • ExperimentalUseCaseGroupLifecycle annotation is removed now that the APIs are no longer experimental. (I17b85)
  • refactored RotationListener and renamed it to RotationProvider. It continues to provide the same feature with slightly different API. (Idffc5)
  • rename TAP_TO_FOCUS_UNSUCCESSFUL to TAP_TO_FOCUS_NOT_FOCUSED and TAP_TO_FOCUS_SUCCESSFUL to TAP_TO_FOCUS_FOCUSED. Made OutputSize final (I099fa)

Bug Fixes

  • Removed deprecated Extender classes, ExtensionsErrorListener and related ExtensionsManager APIs. (I3b8c3)

Version 1.0.0-alpha27

July 21, 2021

androidx.camera:camera-extensions:1.0.0-alpha27 and androidx.camera:camera-view:1.0.0-alpha27 are released. Version 1.0.0-alpha27 contains these commits.

API Changes

  • Promoted the viewport API out of experimental. Remove the experimental annotation of the API. (I717ea)
  • Renamed CoordinateTransform#getTransform to CoordinateTransform#transform and update JavaDoc (I864ae)

Bug Fixes

  • Fixed PreviewView PERFORMANCE mode stretch issue when using it together with Compose UI. (Ie1137, b/183864890)

Version 1.0.0-alpha26

June 30, 2021

androidx.camera:camera-extensions:1.0.0-alpha26 and androidx.camera:camera-view:1.0.0-alpha26 are released. Version 1.0.0-alpha26 contains these commits.

API Changes

  • add a new method CameraController#getTapToFocusState() that exposes the latest tap-to-focus result. (Iaccb0)
  • adding more camera-core features to CameraController: getters/setters for target aspect ratio, target resolution, capture mode, CameraControl and custom executors. (Iea8f2)
  • add a RotationReceiver class that receives Surface rotation changes. This can be used to set the target rotation when the device is in fixed portrait/landscape mode. (Ib278f)
  • Exposed new getEstimatedCaptureLatencyRange public APIs in ExtensionsManager class. (I6a8ec)
  • Deprecated ExtensionsErrorListener. Currently, this interface is only used to monitor whether a Preview or ImageCapture is lacking when enabling extension modes. CameraX will automatically add an extra Preview or ImageCapture to make the extension functions work well. After that, no error will be reported via this interface. (I47d9e)
  • Exposed new ExtensionsManager getInstance, isExtensionAvailable and getExtensionEnabledCameraSelector public APIs and deprecated old Extender classes and related APIs. (I329e6)

Version 1.0.0-alpha25

June 2, 2021

androidx.camera:camera-extensions:1.0.0-alpha25 and androidx.camera:camera-view:1.0.0-alpha25 are released. Version 1.0.0-alpha25 contains these commits.

API Changes

  • ExperimentalCameraFilter APIs are now out of experimental
    stage and become formal APIs. They can be used without annotated OptIn. (I4bc94)
  • Add a utility that transforms coordinates between use cases. Example usage: transforming the coordinates detected in ImageAnalysis use case and highlight the detected object in preview. (I63ab1, b/137515129)
  • Removed CameraView. CameraView has been replaced by CameraController. Please see the migration guide for how to migrate.: (Id5005)

Bug Fixes

  • Replaced ExperimentalUseCaseGroupLifecycle with
    ExperimentalUseCaseGroup. (I3b2ef, b/159033688)

Version 1.0.0-alpha24

April 21, 2021

androidx.camera:camera-extensions:1.0.0-alpha24 and androidx.camera:camera-view:1.0.0-alpha24 are released. Version 1.0.0-alpha24 contains these commits.

Bug Fixes

  • Replaced annotation @Experimental with @RequiresOptIn to experimental APIs. For calling experimental APIs, use androidx.annotation.OptIn instead of deprecated androidx.annotation.experimental.UseExperimental. (Iff226)
  • Fixed the PreviewView stretched issue on Samsung J5 Prime (Ib10b6)

Camera Extensions & View Version 1.0.0-alpha23

March 24, 2021

androidx.camera:camera-extensions:1.0.0-alpha23 and androidx.camera:camera-view:1.0.0-alpha23 are released. Version 1.0.0-alpha23 contains these commits.

API Changes

  • CameraView is being deprecated. Please use LifecycleCameraController instead. See the migration guide (Idac2c)
  • Added FloatRange annotation to setLinearZoom() (I69971)

Bug Fixes

  • Pinned camera-view dependencies to rely on 1.0.0 artifacts.
    Depending on camera-view will not longer cause gradle’s dependency
    resolution to automatically upgrade camera-core, camera-camera2 and
    camera-lifecycle to the latest 1.1.0 artifacts, though camera-view is
    still compatible with those artifacts if they are explicitly set to use
    1.1.0. (Ic8fa1, b/181599852)
  • Fixed Samsung A3 stretched preview in PreviewView. (Iacb30, b/180121821)
  • Fixed the issue where if camera selector cannot be set before camera is initialized. (Ic8bd0)

Camera Extensions & View Version 1.0.0-alpha22

February 24, 2021

androidx.camera:camera-extensions:1.0.0-alpha22 and androidx.camera:camera-view:1.0.0-alpha22 are released. Version 1.0.0-alpha22 contains these commits.

API Changes

Bug Fixes

  • Fixed ExtensionsErrorListener to report errors when only Preview or ImageCapture is bound. (I5ae39)

Camera Extensions & View Version 1.0.0-alpha21

January 27, 2021

androidx.camera:camera-extensions:1.0.0-alpha21 and androidx.camera:camera-view:1.0.0-alpha21 are released. Version 1.0.0-alpha21 contains these commits.

Releasing to support other camera library artifacts.

Camera Extensions & View Version 1.0.0-alpha20

December 16, 2020

androidx.camera:camera-extensions:1.0.0-alpha20 and androidx.camera:camera-view:1.0.0-alpha20 are released. Version 1.0.0-alpha20 contains these commits.

Releasing to support other camera library artifacts.

Camera-Extensions & Camera-View Version 1.0.0-alpha19

November 11, 2020

androidx.camera:camera-extensions:1.0.0-alpha19 and androidx.camera:camera-view:1.0.0-alpha19 are released. Version 1.0.0-alpha19 contains these commits.

Bug Fixes

  • @ExperimentalVideo annotation was introduced to camera-view.
    This annotation marks APIs which expose experimental video functionality
    which is subject to change as the features are fully developed. Any
    method using these APIs should use the @UseExperimental annotation
    with ExperimentalVideo as the markerClass. (I6d729)

Camera-Extensions Version 1.0.0-alpha18

October 14, 2020

androidx.camera:camera-extensions:1.0.0-alpha18 is released. Version 1.0.0-alpha18 contains these commits.

Bug Fixes

  • Improved the latency of CameraX initialization and
    bindToLifecycle (I61dc5)
  • .getTargetRotation() will return Surface.ROTATION_0
    if called before being attached to a Camera instance unless a
    targetRotation has been set on the Builder or UseCase. (I80fcd)

Camera-View Version 1.0.0-alpha18

October 14, 2020

androidx.camera:camera-view:1.0.0-alpha18 is released. Version 1.0.0-alpha18 contains these commits.

Releasing to support other camera library artifacts.

Camera-Extensions Version 1.0.0-alpha17

September 23, 2020

androidx.camera:camera-extensions:1.0.0-alpha17 is released. Version 1.0.0-alpha17 contains these commits.

Bug Fixes

Camera-View Version 1.0.0-alpha17

September 23, 2020

androidx.camera:camera-view:1.0.0-alpha17 is released. Version 1.0.0-alpha17 contains these commits.

Bug Fixes

Camera-Extensions Version 1.0.0-alpha16

September 16, 2020

androidx.camera:camera-extensions:1.0.0-alpha16 is released. Version 1.0.0-alpha16 contains these commits.

Bug Fixes

  • Added method in ExtensionsManager to get an Extensions object
    which is used to enable and query extensions on Camera instances (I4fb7e)

Camera-View Version 1.0.0-alpha16

September 16, 2020

androidx.camera:camera-view:1.0.0-alpha16 is released. Version 1.0.0-alpha16 contains these commits.

API Changes

  • Removed PreviewView#setDeviceRotationForRemoteDisplayMode() and PreviewView#getDeviceRotationForRemoteDisplayMode(). The two methods are for customizing preview rotation, when desired rotation is not display rotation, e.g. remote display. To handle the non-display preview rotation now, set the desired rotation with Preview#setTargetRotation() and the newly added PreviewView#getViewPort(targetRotation). (Ib62cc)
  • Renamed createSurfaceProvider() to getSurfaceProvider(). The method will always return the same instance of Preview.SurfaceProvider. (Iff83c)

Bug Fixes

  • Forced PreviewView to use TextureView if extension effect is enabled and the vendor library implementation needs to do a special process on the output surface. (I0c3cc)
  • Allow arbitrary target rotation for Preview. The transformation info is calculated and returned to user on-the-fly via a new TranformationInfoListener callback. (I21470)

Known Issues

  • In PreviewView, OnClickListener#onClick() is not invoked when the end user clicks PreviewView. The touch event is mistakenly consumed by PreviewView#onTouchEvent(). The issue will be fixed in the next release.
  • The MeteringPoint obtained from PreviewView#getMeteringPointFactory() may be wrong if ViewPort is used with PreviewView.

Camera-Extensions Version 1.0.0-alpha15

August 19, 2020

androidx.camera:camera-extensions:1.0.0-alpha15 is released. Version 1.0.0-alpha15 contains these commits.

Bug Fixes

  • The ExtensionsManager.init() method now takes in a
    Context as a parameter instead of having 0 args. (Ife754)
  • Initialization should no longer crash when using a Context
    that does not return an Application object from Context.getApplicationContext(). (I3d3c9, b/160817073)

    Camera-View Version 1.0.0-alpha15

    August 19, 2020

androidx.camera:camera-view:1.0.0-alpha15 is released. Version 1.0.0-alpha15 contains these commits.

Bug Fixes

  • DisplayOrientedMeteringPointFactory takes in a CameraInfo
    instance instead of a CameraSelector so there is a direct mapping to
    which Camera the factory will be generating points for. All classes
    which use DisplayOrientedMeteringPointFactory also take in a CameraInfo
    instance instead of CameraSelector. (I400c1)
  • Removed TextureViewMeteringPointFactory. PreviewView provides a public API (createMeteringPointFactory()) to create a metering point factory regardless of whether it’s using a TextureView or SurfaceView. (Ide693)
  • rename PreviewView’s SURFACE_VIEW/TEXTURE_VIEW implementation modes to PERFORMANCE/COMPATIBLE. PERFORMANCE is the old SURFACE_VIEW mode, and COMPATIBLE is the old TEXTURE_VIEW mode. (I0edc2)
  • For image capture, overwrite the flip horizontal flag in metadata based on camera direction. (I28499)

Camera-Extensions Version 1.0.0-alpha14

July 22, 2020

androidx.camera:camera-extensions:1.0.0-alpha14 is released. Version 1.0.0-alpha14 contains these commits.

Camera-View Version 1.0.0-alpha14

July 22, 2020

androidx.camera:camera-view:1.0.0-alpha14 is released. Version 1.0.0-alpha14 contains these commits.

Camera-Extensions Version 1.0.0-alpha13

June 24, 2020

androidx.camera:camera-extensions:1.0.0-alpha13 is released. Version 1.0.0-alpha13 contains these commits.

Bug Fixes

  • Added experimental interfaces for filtering cameras by camera
    ID and CameraCharacteristics. (I28f61)

Camera-View Version 1.0.0-alpha13

June 24, 2020

androidx.camera:camera-view:1.0.0-alpha13 is released. Version 1.0.0-alpha13 contains these commits.

Bug Fixes

  • CameraView no longer crashes with an IllegalArgumentException
    when binding to a LifecycleOwner whose Lifecycle transitions to a DESTROYED
    state shortly after being bound. Binding Lifecycles in a DESTROYED state
    will not attempt to open the camera. (I7c2b8)
  • PreviewView StreamState is now available through
    CameraView.getPreviewStreamState() (I21a2b)

Camera-Extensions Version 1.0.0-alpha12

June 10, 2020

androidx.camera:camera-extensions:1.0.0-alpha12 is released. Version 1.0.0-alpha12 contains these commits.

Bug Fixes

  • Fix the crash on app startup when initialising CameraX while phone is in Do Not Disturb mode. An InitializationException contains a CameraUnavailableException will be set to the ListenableFuture of the intialization result instead of crashing the application. (I9909a, b/149413835)

Camera-View Version 1.0.0-alpha12

June 10, 2020

androidx.camera:camera-view:1.0.0-alpha12 is released. Version 1.0.0-alpha12 contains these commits.

Bug Fixes

  • Add PreviewView#getBitmap() API which returns a Bitmap representation of the content displayed on the preview surface. (I9b500, b/157659818)

Camera-Extensions Version 1.0.0-alpha11

May 27, 2020

androidx.camera:camera-extensions:1.0.0-alpha11 is released. Version 1.0.0-alpha11 contains these commits.

Camera-View Version 1.0.0-alpha12

June 10, 2020

androidx.camera:camera-view:1.0.0-alpha12 is released. Version 1.0.0-alpha12 contains these commits.

New Features

API Changes

Bug Fixes

  • Add PreviewView#getBitmap() API which returns a Bitmap representation of the content displayed on the preview surface. (I9b500, b/157659818)

Camera-View Version 1.0.0-alpha11

May 27, 2020

androidx.camera:camera-view:1.0.0-alpha11 is released. Version 1.0.0-alpha11 contains these commits.

API Changes

  • Add PreviewView#getPreviewStreamState API which
    allows apps to observe if preview is streaming or not. When
    the PreviewView is in TEXTURE_VIEW mode, the STREAMING state
    also guarantees the preview image is visible. (Ic0906, b/154652477)
  • Added PreviewView#setDeviceRotationForRemoteDisplayMode() API to provide device rotation for transform calculations if the application is running in remote display mode. (I59b95, b/153514525)

Bug Fixes

  • Fixed the preview distortion issue on FULL/LIMITED/LEVEL_3 cameras running android 7.0 and below. Forced use ImplementationMode#TEXTURE_VIEW mode when the android version is 7.0 or below. (I83e30, b/155085307)
  • Removed the CameraInfo parameter from PreviewView#createSurfaceProvider(), PreviewView now internally retrieves it from the SurfaceRequest. (If18f0, b/154652477)
  • Fixed the VideoCapture’s default aspect ratio to be 16:9 in CameraView. (Ie6a7b, b/153237864)
  • Fix PreviewView black screen issues when swiped out Preview fragment and then swiped back in ViewPager2. Also fixed the issue when removeView(previewview) and then addView(previewView). (Iab555, b/149877652, b/147354615)
  • Update the CameraView#takePicture() API to allow saving images to Uri and OutputStream. Update the test app to use Uri as the canonical example. (Ia2459, b/153607583)
  • You can set PreviewView’s scale type from a XML layout by setting the ScaleType attribute. (I08565, b/153015659)
  • CameraView.ScaleType has been removed. Instead, use PreviewView.ScaleType to set/get a scale type with CameraView. (Ia8974, b/153014831)
  • Give PreviewView a background color by default if it doesn’t already have one. This prevents content behind it from being visible before the preview stream starts. (I09fad)

Camera-Extensions Version 1.0.0-alpha10

April 15, 2020

androidx.camera:camera-extensions:1.0.0-alpha10 is released. Version 1.0.0-alpha10 contains these commits.

Bug Fixes

  • Fixes to support the release of Camera-Core

Camera-View Version 1.0.0-alpha10

April 15, 2020

androidx.camera:camera-view:1.0.0-alpha010 is released. Version 1.0.0-alpha010 contains these commits.

Bug Fixes

  • Fixes a previous known issue where PreviewView‘s surfaceView implementation wasn’t working well on certain devices, and would cause the app to crash after resuming preview. (I5ed6b)

Camera-Extensions Version 1.0.0-alpha09

April 1, 2020

androidx.camera:camera-extensions:1.0.0-alpha09 is released. Version 1.0.0-alpha09 contains these commits.

Bug Fixes

  • Updated to support the bug fixes in the camera-camera2:1.0.0-beta02, camera-core:1.0.0-beta02, and camera-lifecycle:1.0.0-beta02 artifacts

Camera-View Version 1.0.0-alpha09

April 1, 2020
androidx.camera:camera-view:1.0.0-alpha09 is released. Version 1.0.0-alpha09 contains these commits.

Known Issues

  • Using ImplementationMode.SURFACE_VIEW with PreviewView may not work well on certain devices, this is because the SurfaceView used for preview invalidates its surface when the lifecycle of the window it’s in is stopped, when it restarts, the camera is reopened and may attempt to resume preview before the SurfaceView‘s surface is valid again. For now, you should use ImplementationMode.TEXTURE_VIEW.

API Changes

  • Renamed PreviewView.setImplementationMode() to PreviewView.setPreferredImplementationMode().
  • Renamed PreviewView.getImplementationMode() to PreviewView.getPreferredImplementationMode().
  • Replaced PreviewView.getSurfaceProvider() by PreviewView.createSurfaceProvider(CameraInfo), which takes a nullable CameraInfo instance used to optimize preview by using ImplementationMode.SURFACE_VIEW whenever possible. If a null instance is passed, or if you set the preferred implementation mode to ImplementationMode.TEXTURE_VIEW, ImplementationMode.TEXTURE_VIEW is used internally.
  • The following code sample shows how a preview use case used to previously be used with PreviewView.

    preview.setSurfaceProvider(previewView.previewSurfaceProvider)
    cameraProvider.bindToLifecycle(lifecycleOwner, cameraSelector, preview)
    

    Right now, you can write the following:

    val camera = cameraProvider.bindToLifecycle(lifecycleOwner, cameraSelector, preview)
    previewView.preferredImplementationMode = ImplementationMode.TEXTURE_VIEW
    preview.setSurfaceProvider(previewView.createSurfaceProvider(camera.cameraInfo))
    
  • The @UiThread annotation has been added to PreviewView.getSurfaceProvider(), meaning it must be called from the main thread. (I192f3)

  • Added PreviewView.setScaleType() which allows to set the scale type of the preview. It accepts one of the values in PreviewView.ScaleType, and defaults to PreviewView.ScaleType.FILL_CENTER.

  • Added PreviewView.getScaleType().

  • Removed support for setting the implementation mode for PreviewView in a XML layout using the implementationMode attribute.

  • Add createMeteringPointFactory() API to PreviewView to support converting (x, y) in PreviewView to MeteringPoint. (Ib36d7)

Bug Fixes

  • Fixed cases where an incorrect preview is displayed after PreviewView‘s size changes. (I71101)

Camera-Extensions Version 1.0.0-alpha08

February 26, 2020

androidx.camera:camera-extensions:1.0.0-alpha08 is released. Version 1.0.0-alpha08 contains these commits.

Camera-View Version 1.0.0-alpha08

February 26, 2020

androidx.camera:camera-view:1.0.0-alpha08 is released. Version 1.0.0-alpha08 contains these commits.

Bug Fixes

  • Replaced the ListenableFuture on
    SurfaceRequest.provideSurface() with an Executor and Callback. This
    simplifies the API by no longer requiring handling of exceptions on
    provideSurface() and enforces that the provideSurface() callback cannot
    be cancelled. This is to prevent crashes on older devices caused by
    prematurely releasing surfaces. The SurfaceRequest.Result object is now used
    for tracking how a SurfaceRequest uses the provided Surface. (I7854b)
  • Renamed SurfaceRequest.setSurface(Surface) to
    SurfaceRequest.provideSurface(Surface) and
    SurfaceRequest.setWillNotComplete() to
    SurfaceRequest.willNotProvideSurface(). (I224fe)
  • Fixed initialization of app variants with ProGuard enabled by preserving the
    flag that sets the default CameraXConfig provider. (I2d6c1)

Camera-Extensions Version 1.0.0-alpha07

February 10, 2020

androidx.camera:camera-extensions:1.0.0-alpha07 is released. Version 1.0.0-alpha07 contains these commits.

Bug Fixes

  • The arguments that were previously passed in ImageCapture.OnImageSavedCallback.onError() and ImageCapture.OnImageCapturedCallback.onError() have now been replaced by a single argument ImageCaptureException, which still contains all the information that was previously passed.
  • The file argument previously passed in ImageCapture.OnImageSavedCallback.onImageSaved() has been removed. (I750d2)

Camera-View Version 1.0.0-alpha07

February 10, 2020

androidx.camera:camera-view:1.0.0-alpha07 is released. Version 1.0.0-alpha07 contains these commits.

API Changes

  • PreviewView‘s TextureView implementation now sets the TextureView‘s size to the camera sensor output size before scaling it to fill its parent PreviewView. If you want the camera preview to fill an entire part of the UI (the whole screen for instance), you should not set the PreviewView‘s size to a fixed value, or have it wrap its content (by using the attribute “wrap_content” for example), this may result in the camera preview only filling part of the PreviewView (if the camera sensor output size is smaller). Instead, you should set the PreviewView as big as its parent (by using the attribute “match_parent” for example). (1204869)

Bug Fixes

  • Updated ImageCapture to allow saving images to Uri and OutputStream. Combined overloaded takePicture methods into one. Updated test app to use Uri as the canonical example. (Ia3bec)
  • Preview.PreviewSurfaceProvider has been renamed to Preview.SurfaceProvider. SurfaceProviders no longer require developers to create their own ListenableFuture, and providing a Surface is now done through a new SurfaceRequest object. The Preview.getPreviewSurfaceProvider() method has been removed due to its potential for misuse when Preview is paired with other classes such as PreviewView. (I20105)
  • The arguments that were previously passed in ImageCapture.OnImageSavedCallback.onError() and ImageCapture.OnImageCapturedCallback.onError() have now been replaced by a single argument ImageCaptureException, which still contains all the information that was previously passed.
  • The file argument previously passed in ImageCapture.OnImageSavedCallback.onImageSaved() has been removed. (I750d2)
  • API updated, with getZoomRatio(), getMaxZoomRatio(), getMinZoomRatio(), and getLinearZoom() methods of CameraInfo merging into getZoomState() which returns a ZoomState instance. (Ib19fe)

Camera-Extensions Version 1.0.0-alpha06

January 22, 2020

androidx.camera:camera-extensions:1.0.0-alpha06 is released. Version 1.0.0-alpha06 contains these commits.

Updates

  • Various fixes and updates to support Camera Core & Camera2 changes.

Camera-View Version 1.0.0-alpha06

January 22, 2020

androidx.camera:camera-view:1.0.0-alpha06 is released. Version 1.0.0-alpha06 contains these commits.

Updates

  • Various fixes and updates to support Camera Core & Camera2 changes.

Camera-Extensions Version 1.0.0-alpha05

December 18, 2019

androidx.camera:camera-extensions:1.0.0-alpha05 is released. Version 1.0.0-alpha05 contains these commits.

Bug Fixes

  • Updated to match the internal Camera Core APIs.

Camera-View Version 1.0.0-alpha05

December 18, 2019

androidx.camera:camera-view:1.0.0-alpha05 is released. Version 1.0.0-alpha05 contains these commits.

Known Issues

  • The aspect ratio may be incorrect when using PreviewView (b/146215202).

New Features

  • Implemented a new class called PreviewView.TextureViewImplementation that syncs the SurfaceTexture’s lifecycle with the camera’s usage of the TextureView’s surface.

Camera-Extensions Version 1.0.0-alpha04

December 4, 2019

androidx.camera:camera-extensions:1.0.0-alpha04 is released. Version 1.0.0-alpha04 of camera-extensions contains these commits

API changes

  • Checking for the availability and enabling of an extension now takes in a CameraSelector as an input parameter. This needs to be the same CameraSelector that is used for binding the use case.

    val cameraSelector = CameraSelector.DEFAULT_BACK_CAMERA
    val builder = ImageCapture.Builder()
    val bokehImageCaptureExtender = BokehImageCaptureExtender.create(builder)
    if (bokehImageCaptureExtender.isExtensionAvailable(cameraSelector)) {
        bokehImageCaptureExtender.enableExtension(cameraSelector)
    }
    val imageCapture = builder.build()
    mCameraProvider?.bindToLifecycle(this, cameraSelector, imageCapture)
    
  • You must initialize extensions before using the extension library.

    val availability = ExtensionsManager.init()
    Futures.addCallback(
       availability,
       object : FutureCallback {
           override fun onSuccess(availability: ExtensionsManager.ExtensionsAvailability?) {
               // Ready to make extensions calls
           }
           override fun onFailure(throwable: Throwable) {
               // Extensions could not be initialized
           }
       },
       Executors.newSingleThreadExecutor()
    )
    

Camera-View Version 1.0.0-alpha04

December 4, 2019

androidx.camera:camera-view:1.0.0-alpha04 is released. Version 1.0.0-alpha04 of camera-view contains these commits

API changes

  • A PreviewView class is provided for easily displaying the output from the Preview use case in an application.
  • PreviewView can be included in the layout:

    
    
  • PreviewView provides a PreviewSurfaceProvider to easily connect a Preview use case

    preview.setPreviewSurfaceProvider(previewView.previewSurfaceProvider)
    
  • ZoomLevel” is now “ZoomRatio” in API-naming

  • Some method parameters have changed nullability

Camera-Extensions and Camera-View Version 1.0.0-alpha03

October 9, 2019

androidx.camera:camera-extensions:1.0.0-alpha03 and androidx.camera:camera-view:1.0.0-alpha03 are released. These are the commits included in camera-extensions:1.0.0-alpha03 and these are the commits included in camera-view:1.0.0-alpha03.

New Features

  • Added Context initializer for extensions. Extensions version incremented to 1.1.0

Camera-Extensions and Camera-View Version 1.0.0-alpha02

September 5, 2019

androidx.camera:camera-extensions:1.0.0-alpha02 and
androidx.camera:camera-view:1.0.0-alpha02 are released. These are the
commits included in camera-extensions:1.0.0-alpha02
and these are the commits included
camera-view:1.0.0-alpha02
.

  • Added tests to verify PreviewImageProcessorImpl has correctly implemented
    timestamps.
  • Fix ExtensionTest test failure on Nexus 5 (API level 21) and ensure preview
    is available.

Camera-Extensions and Camera-View Version 1.0.0-alpha01

August 7, 2019

androidx.camera:camera-extensions:1.0.0-alpha01 and
androidx.camera:camera-view:1.0.0-alpha01 are released.
These are the
commits included in camera-extensions:1.0.0-alpha01
and these are the commits included
camera-view:1.0.0-alpha01

  • New library for future Camera Extensions for accessing effects on supported devices. This library is a work in progress.
  • New Camera View class. This library is a work in progress.

This library was last updated on: July 26, 2023

Device testing

This library equal last update on : july twenty-six, 2023 CameraX be test along many device in our lab. To learn ampere list of the devices presently indium the lab, attend CameraX lab-tested device .

Declaring dependencies

To total a addiction on CameraX, you mustiness add the google ace repository to your project. read google ‘s ace repository for more information .
add the colony for the artifact you want inch the build.gradle file for your app oregon faculty :

Groovy

dependencies {
  // CameraX core library using the camera2 implementation
  def camerax_version = "1.3.0-beta02"
  // The following line is optional, as the core library is included indirectly by camera-camera2
  implementation "androidx.camera:camera-core:${camerax_version}"
  implementation "androidx.camera:camera-camera2:${camerax_version}"
  // If you want to additionally use the CameraX Lifecycle library
  implementation "androidx.camera:camera-lifecycle:${camerax_version}"
  // If you want to additionally use the CameraX VideoCapture library
  implementation "androidx.camera:camera-video:${camerax_version}"
  // If you want to additionally use the CameraX View class
  implementation "androidx.camera:camera-view:${camerax_version}"
  // If you want to additionally add CameraX ML Kit Vision Integration
  implementation "androidx.camera:camera-mlkit-vision:${camerax_version}"
  // If you want to additionally use the CameraX Extensions library
  implementation "androidx.camera:camera-extensions:${camerax_version}"
}

Kotlin

dependencies {
    // CameraX core library using the camera2 implementation
    val camerax_version = "1.3.0-beta02"
    // The following line is optional, as the core library is included indirectly by camera-camera2
    implementation("androidx.camera:camera-core:${camerax_version}")
    implementation("androidx.camera:camera-camera2:${camerax_version}")
    // If you want to additionally use the CameraX Lifecycle library
    implementation("androidx.camera:camera-lifecycle:${camerax_version}")
    // If you want to additionally use the CameraX VideoCapture library
    implementation("androidx.camera:camera-video:${camerax_version}")
    // If you want to additionally use the CameraX View class
    implementation("androidx.camera:camera-view:${camerax_version}")
    // If you want to additionally add CameraX ML Kit Vision Integration
    implementation("androidx.camera:camera-mlkit-vision:${camerax_version}")
    // If you want to additionally use the CameraX Extensions library
    implementation("androidx.camera:camera-extensions:${camerax_version}")
}

Feedback

Your feedback aid make Jetpack well. let uranium know if you identify new topic oregon accept theme for better this library. please learn vitamin a expect astatine the existing offspring in this library ahead you make a newfangled one. You toilet lend your vote to associate in nursing existent return aside click the star push button .
create vitamin a new issue
interpret the issue tracker documentation for more information .

Version 1.3

Version 1.3.0-beta02

july twenty-six, 2023
androidx.camera:camera-*:1.3.0-beta02 be release. version 1.3.0-beta02 contain these entrust .
Bug Fixes

  • Use torch as flash for Pixel 4 and 5 variants to improve capture quality in low light (I56ff5, b/280221967)
  • Fixed large captured JPEG image issue on Samsung A5 (2017) 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 about 32 MB file size. Those redundant 0’s padding data will be removed to make the captured images have normal image file sizes. (I29837, b/288828159)
  • Fixed retry not triggering properly in case of capture failure in problematic devices mentioned in CaptureFailedRetryQuirk. (I7b589)

Version 1.3.0-beta01

june twenty-one, 2023
androidx.camera:camera-*:1.3.0-beta01 be free. interpretation 1.3.0-beta01 contain these entrust .
API Changes

  • Renamed the ResolutionSelector.Builder#setHighResolutionEnabledFlag(int) function name to setAllowedResolutionMode and renamed the ResolutionSelector#HIGH_RESOLUTION_FLAG_OFF/ON constants to PREFER_CAPTURE_RATE_OVER_HIGHER_RESOLUTION/PREFER_HIGHER_RESOLUTION_OVER_CAPTURE_RATE. (If84e8)
  • Removed deprecated API ImageAnalysis.setTargetRotationDegrees(int), ImageCapture.setTargetRotationDegrees(int) and VideoCapture.setTargetRotationDegrees(int). (Id8e77)
  • The DynamicRange class respresent the dynamic range of images. This can be used to select High Dynamic Range formats as the output of VideoCapture through VideoCapture.Builder#setDynamicRange(). (Ib0377)
  • Added an isImageAnalysisSupported API to the ExtensionsManager which apps can determine if an ImageAnalysis use case can be bound along with Preview and ImageCapture when Extensions are enabled. (I1bc63)
  • The new VideoCapabilities class obtained from the Recorder can be used to query supported dynamic ranges and qualities for video recording on the device. QualitySelector‘s getSupportedQualities() and isQualitySupported() methods are being deprecated. Please use VideoCapabilities‘s getSupportedQualities() and isQualitySupported() methods instead. (I04014)
  • CameraController#setVideoCaptureTargetQuality() is renamed to setVideoCaptureQualitySelector and takes argument QualitySelector, which provides more flexibility for video quality setup. CameraController#getVideoCaptureTargetQuality() is changed to getVideoCaptureQualitySelector accordingly. (I520ed)
  • Removed the experimental annotation for video features. The video features are now stable. (I1a113)

Bug Fixes

  • Use torch as flash on Samsung SM-A320 models to improve the speed and the captured image quality in low light. (I6a022, b/286190938)
  • Add ImageFormat.JPEG format support for ImageProxy.toBitmap(). If the JPEG byte array cannot be decoded, an UnsupportedOperationException will be thrown. (I81958, b/282057603)

Version 1.3.0-alpha07

whitethorn twenty-four, 2023
androidx.camera:camera-*:1.3.0-alpha07 be release. translation 1.3.0-alpha07 contain these entrust .
New Features

  • The new VideoCapture.Builder# setTargetFrameRate(Range) API allows video recordings to be captured at other frame rates besides the device default. The available frame rates for recordings can be queried through the new CameraInfo#getSupportedFrameRates() API.

API Changes

  • Renamed ResolutionSelector#HIGH_RESOLUTION_FLAG_OFF/ON constants to ALLOWED_RESOLUTIONS_NORMAL/SLOW and renamed the builder setHighResolutionEnabledFlag function name to setAllowedResolutionMode. (Iae817)
  • CameraInfo#getSupportedFrameRateRanges() now returns a Set rather than a List to better represent that the ranges are unordered. (I02f43)
  • Add an error listener to CameraEffect to handle unrecoverable errors (Ice471)
  • Add public constructor in ResolutionInfo for better testability (If6d1c)
  • Provided an API UseCase.snapToSurfaceRotation(int) to replace usage of setTargetRotationDegrees and deprecate API ImageAnalysis.setTargetRotationDegrees(int), ImageCapture.setTargetRotationDegrees(int) and VideoCapture.setTargetRotationDegrees(int). (Ia9010)
  • Added new API Preview#getTargetFrameRate and Preview.Builder#setTargetFrameRate to be able to set and retrieve target frame rate for Preview use case (If4f22)
  • VideoRecordEvent.Finalize will now complete with error code ERROR_RECORDING_GARBAGE_COLLECTED when the Recording object is stopped due to garbage collection. (Iba974)

Bug Fixes

  • Fixed NullPointerException when the cached output sizes in StreamConfigurationMapCompat are null. (Idf124, b/282025204)
  • Fixed the issue that Preview.setSurfaceProvider(null) doesn’t pause the preview in Extensions (Ia903e)
  • Fixed an issue where ConcurrentModificationException is thrown during camera opening when VideoCapture is bound. (Ic8ac4)

Version 1.3.0-alpha06

april nineteen, 2023
androidx.camera:camera-*:1.3.0-alpha06 be secrete. version 1.3.0-alpha06 incorporate these commit .
New Features

  • Concurrent camera is a new feature introduced from Android 11, which supports simultaneous streaming of camera devices, for example, it allows a device to have both the front and back cameras operating at the same time.
    CameraX currently only supports dual concurrent cameras, which allows two cameras operating at the same time, with at most two {@link UseCase}s bound for each. The max resolution is 720p or 1440p, more details in the following link, see CameraManager#getConcurrentCameraIds()
  • Introducing the new ResolutionSelector API which covers the following features:
    • Applications can specify aspect ratio and resolution strategies to select the best resolution for their needs.
    • All sizes and aspect ratio parameters are expressed in the coordinates of the camera device sensor.
    • Applications can implement a custom resolution filter to arrange the supported sizes in the desired order.
    • Applications can also enable high resolution capture to obtain higher resolution images. However, please note that using a high resolution may result in slower capture times.
    • Added VideoCapture mirroring APIs. Videos recorded by VideoCapture are not mirrored by default. However, the camera preview is mirrored on the front camera by default. VideoCapture mirroring APIs make it possible to align to the camera preview when using the front camera. There are three MirrorMode, OFF, ON and ON_FRONT_ONLY. To align to the camera preview, it is recommended to use ON_FRONT_ONLY which means that mirroring is not enabled for the rear camera but is enabled for the front camera.

API Changes

  • Exposed new ResolutionSelector API. Applications can specify aspect ratio and resolution strategies with fallback rules or a custom resolution filter to get the desired results. Applications can specify a flag to enable high resolution capture. This will allow CameraX to select higher resolutions when taking photos or videos. However, please note that using a high resolution may result in slower capture times. (Ibed95)
  • The FPS ranges supported by the AE algorithm can now be queried via CameraInfo#getSupportedFrameRateRanges(). (Iaa67f)
  • Consolidate the names of all frame rate methods into using ‘FrameRate’. Correct the javadoc mistake in VideoCapture#getTargetFrameRate() (I83304)
  • Deprecated the legacy setTargetAspectRatio and setTargetResolution API. Please use the new ResolutionSelector API instead. (I542c3)
  • Added public APIs for concurrent dual camera, including
    1. List> getAvailableConcurrentCameraInfos()
    2. ConcurrentCamera bindToLifecycle(@NonNull ConcurrentCameraConfig concurrentCameraConfig)
    3. boolean isConcurrentCameraModeOn()
      and ConcurrentCameraConfig, SingleCameraConfig and ConcurrentCamera (Iab1c1)
  • Make ImageProcessor.Response#getOutputImage NonNull (Ib9c60)
  • Added VideoCapture mirroring APIs, including VideoCapture.Builder.setMirrorMode(int) and VideoCapture.getMirrorMode(). The APIs are useful for applications require the video recording to be consistent with common camera preview behavior, i.e. the rear camera preview is not mirrored but the front camera preview is mirrored. (I713b6, b/194634656)
  • Add setTargetFrameRate() API in the VideoCapture.Builder and getTargetFramerate() API in VideoCapture (I109d4)
  • Make SurfaceOutput extending Closable and hide SurfaceOutput.Event‘s public constructor. (I60ea8)
  • Added Recording.mute to dynamically mute or unmute an in-processing recording. RecordingStats will contain AudioStats.AUDIO_STATE_MUTED when the in-processing recording is muted explicitly. (Ie17fc)
  • Made #setEffects() parameter non-null. Add a #clearEffects() API for clearing effects. The app should call #clearEffects() to remove effects. (I4b4d9)
  • Add a second constructor for ViewfinderSurfaceRequest.Builder to take a builder for copy constructor (I621a7)

Bug Fixes

  • Fixed the issue where apps invoking Extensions API could crash when closing the camera (Ib27e5)
  • Fixed an issue where VideoCapture could not work with the front camera on some devices. For example, on Samsung Galaxy S23 and Xiaomi 2107113SG. (Ibec7e, b/270656244)
  • Fixed the issue where taking pictures using File in the external storage public folder will always fail in Android 10 or above. Please note that in Android 10, taking pictures using File in the external storage public folder also requires setting requestLegacyExternalStorage to true in application tag. (I11b2c)
  • Fixed a RejectedExecutionException crash in DefaultSurfaceProcessor. The crash could happen when VideoCapture is bound and the activity is paused. (Idb46a, b/273713906)

Version 1.3.0-alpha05

march twenty-two, 2023
androidx.camera:camera-*:1.3.0-alpha05 be free. version 1.3.0-alpha05 control these perpetrate .
API Changes

  • Added VideoCapture rotation APIs, including VideoCapture.Builder.setTargetRotation(int), VideoCapture.setTargetRotation(int), VideoCapture.setTargetRotationDegrees(int) and VideoCapture.getTargetRotation(). The APIs are useful for applications that lock the device orientation. ImageCapture.setTargetRotationDegrees(int) and ImageAnalysis.setTargetRotationDegrees(int) are also added. (Id3ffe, b/205242781)
  • Allow VIDEO_CAPTURE and PREVIEW|VIDEO_CAPTURE as effects target. Effects that targets VIDEO_CAPTURE will be applied to the VideoCapture UseCase; Effects that targets PREVIEW|VIDEO_CAPTURE will be applied to a shared stream before copying to Preview and VideoCapture stream. (Iee6f3)

Bug Fixes

  • From Camera 1.2.2: Fixed the issue where CameraX Extensions don’t work properly when proguard is enabled on some devices such as Pixel (I90aa2)
  • Fixed a PreviewView bug that if the app handles screen orientation itself. the preview might become distorted upon rotation. This only happens on certain devices. It can be reproduced on Pixel a4, Pixel 5, and Pixel 6a. (I14340, b/223488673)

Version 1.3.0-alpha04

february twenty-two, 2023
androidx.camera:camera-*:1.3.0-alpha04 be exhaust. version 1.3.0-alpha04 hold these give .
New Features
angstrom raw feature to support previously unsupported come on combination aside share one pour to multiple UseCases .

  • Previously, when binding “Preview, VideoCapture, ImageAnalysis” on camera hardware level FULL and below, or binding “Preview, VideoCapture, ImageCapture” on hardware level LEGACY, CameraX throws IllegalArgumentException.
  • The new behavior is that the bindings will work without throwing exceptions. Instead, CameraX uses OpenGL to copy a shared stream to both Preview and VideoCapture.
  • As the cost of the buffer copy, the app may see an increase in latency and power consumption.

API Changes

  • Add API to convert ImageProxy to Bitmap. The supported ImageProxy format is ImageFormat.YUV_420_888 and PixelFormat.RGBA_8888. If the format is invalid, IllegalArgumentException will be thrown. (Ic7110)
  • Add CoroutineCameraViewfinder to support configuring viewfinder using suspending functions in Kotlin. (I657bc)
  • Add new public constructor for ViewfinderSurfaceRequest. It provides the flexibility when user cannot provide CameraCharacteristics. (Ie6549)

Bug Fixes

  • Fixed the Extensions crash that happens on some Samsung devices when pausing/resuming the app too quickly (Iaca26)

Version 1.3.0-alpha03

january twenty-five, 2023
androidx.camera:camera-*:1.3.0-alpha03 constitute free. version 1.3.0-alpha03 incorporate these give .
API Changes

  • Added CameraInfo.getIntrinsicZoomRatio to provide angle of view information relative to the default camera. (Ib300c)
  • Added CameraInfo.getLensFacing to provide lens facing information. Added CameraSelector#LENS_FACING_EXTERNAL as an experimental feature for selecting external cameras. (Icaf3e)
  • Add #setEffect() to CameraController that allows adding effects to camera output. (I1d21f)
  • Add invalidate() method to SurfaceRequest. The Surface provider can notify that the previously provided surface is no longer valid. (Idc649)
  • Add a ImageProcessor API. This interface is for inject post-processing effects into the ImageCapture pipeline. (I575c6)
  • Added API Recorder.Builder.setAspectRatio() which can be combined with QualitySelector to support more video resolutions. (I8a082)
  • Added Recorder.Builder#setTargetVideoEncodingBitRate to set Target Video Encoding BitRate and Recorder#getTargetVideoEncodingBitRate to get Target Video Encoding BitRate. (I5984d)

Bug Fixes

  • Fixed ImageCapture failed when there is no flash unit and flash mode is on. (I9e8b4, b/263391112)
  • Fixed JPEG image corruption issue if writing Exif location data on some Samsung Android 12 devices. (Ib7086, b/263747161, b/263289024)
  • when setting torch/zoom prior before camera initialization compelets, e.g. calling CameraController#enableTorch, the pending action is cached and submitted once the initialization compeltes. (I11e92, b/264157663)

Version 1.3.0-alpha02

december seven, 2022
androidx.camera:camera-*:1.3.0-alpha02 be publish. version 1.3.0-alpha02 contain these invest .
API Changes

  • add a new API for applying post-processing effect to Preview output. (Ic17d5)
  • Renamed OutputOptions.getDurationLimit to OutputOptions.getDurationLimitMillis and OutputOptions.setDurationLimit to OutputOptions.setDurationLimitMillis. (I91f0c)
  • Add AudioConfig class to handle the audio related setting while recording video. The @RequiresPermission annotation is moved from startRecording functions to AudioConfig to avoid unnecessary permission requests for the cases that audio is not needed. (I28755)
  • Remove Metadata, OnVideoSavedCallback, OutputFileOptions and OutputFileResults classes that are no longer used after applying the new video capture API. (I38cd8)
  • Apply the new video capture API. The getVideoCaptureTargetSize and setVideoCaptureTargetSize methods are replaced with the getVideoCaptureTargetQuality and the setVideoCaptureTargetQuality methods accordingly, as setTargetResolution is no longer supported. (I2a1d5)

Bug Fixes

  • Remove deprecated core.VideoCapture API. (I531e0)
  • Fixed the issue that the onError callback is not called when taking pictures without the storage permission.(I936db, b/244807669)
  • Improve camera extensions quality and reliability. Camera extensions are disabled on Motorola devices using Camera Extensions v1.1.0 and older due to issues with Bokeh support, image capture, and preview not resuming. (Id3ce3)
  • Fixed native crash when video cropping via ViewPort is enabled on legacy devices. (I16b8a, b/251357665)

Version 1.3.0-alpha01

november nine, 2022
androidx.camera:camera-*:1.3.0-alpha01 equal exhaust. translation 1.3.0-alpha01 contain these perpetrate .
New Features

  • Camera-viewfinder has been published officially. Camera-viewfinder provides a base viewfinder widget that can display the camera feed for Camera2. Please check the sample code for an example.

API Changes

  • Added OutputOptions.setDurationLimit to allow setting of video duration limit. The recording will be automatically finalized when exceeding the specified duration limit. (I902a0)
  • Add video recording audio error state AudioStats.AUDIO_STATE_SOURCE_ERROR. Sent when audio source setup fails or some error occurs. (I37410)

Bug Fixes

  • Add quirk to allow some problematic devices to retry capture once when encountering capture failures. (Id4795)
  • Fix PreviewView SurfaceView implementation black screen issue on ViewPager2. As part of the fix, PreviewView will reuse its SurfaceView if the requested resolution is not changed. (Ib3f27)
  • Support video cropping (WYSIWYG feature) when ViewPort or CameraController API is used. (Ifbba8, b/201085351)
  • Fixed video captured with front camera fails to record on Huawei P40 lite. (I87c57, b/250807400)

Version 1.2

Version 1.2.3

may twenty-four, 2023
androidx.camera:camera-*:1.2.3 cost free. version 1.2.3 control these perpetrate .
Bug Fixes

  • Fixed an issue where VideoCapture could not work with the front camera on some devices. For example, on Samsung Galaxy S23 and Xiaomi 2107113SG. (Ibec7e, b/270656244)

Version 1.2.2

border twenty-two, 2023
androidx.camera:camera-*:1.2.2 be unblock. interpretation 1.2.2 check these give .
Bug Fixes

  • Fixed the issue where CameraX Extensions don’t work properly when proguard is enabled on some devices such as Pixel (I90aa2)

Version 1.2.1

january twenty-five, 2023
androidx.camera:camera-*:1.2.1 exist free. translation 1.2.1 incorporate these perpetrate .
Bug Fixes

  • Fix JPEG image corruption issue if writing Exif location data on some Samsung Android 12 devices. (b/263289024)

Version 1.2.0

december seven, 2022
androidx.camera:camera-*:1.2.0 be exhaust. version 1.2.0 check these invest .
Important changes since 1.1.0

  • New library camera-mlkit-vision. Easily integrate CameraX with many MLKit features, including barcode scanning, face detection, text detection, etc. Added MLKitAnalyzer as new APIs.
  • New experimental Zero-Shutter Lag API. Optimizes capture pipeline to have better latency while keeping good image quality. When the capture mode is set to CAPTURE_MODE_ZERO_SHUTTER_LAG, the latency between the shutter button is clicked and the picture is taken is expected to be minimized, compared with other capture modes. On devices that don’t support ZERO_SHUTTER_LAG, it’ll fallback to CAPTURE_MODE_MINIMIZE_LATENCY.
  • Deprecate android.camera.core.VideoCapture.
  • Added setStreamUseCase() as a public Camera2Interop API.
  • Added API level requirement for setOutputImageRotationEnabled.
  • Renamed ImageAnalysis.Analyzer#getTargetResolutionOverride() to ImageAnalysis.Analyzer#getDefaultTargetResolution().
  • Added API for setting location metadata to the saved video.
  • Fixed low framerate when using VideoCapture and Preview use cases with 16:9 aspect ratio
  • Fixed the black preview issue that happens when BOKEH extension is enabled on some Samsung devices and the user switches the cameras.
  • Fixed Samsung J7 Prime (SM-G610M) and J7 (SM-J710MN) Preview/VideoCapture stretched issue on API level 27 devices.
  • Disabled the workaround to flip the AF region horizontally of front cameras on Samsung Android T since the issue was fixed

Version 1.2.0-rc01

october twenty-four, 2022
androidx.camera:camera-*:1.2.0-rc01 be let go of. version 1.2.0-rc01 hold these entrust .
API Changes

  • Add setStreamUseCase API for OutputConfiguration. User can specify the Stream Use Case for the stream session, overrding CameraX’s internal logics to choose Stream Use Case in order to optimize according to their need. (Ib1a95)

Bug Fixes

  • Fixed Samsung J7 Prime (SM-G610M) and J7 (SM-J710MN) Preview/VideoCapture stretched issue on API level 27 devices. Resolution 1920×1080 causes the Preview/VideoCapture images to be stretched. Added workaround to not select the 1920×1080 resolution for Preview or VideoCapture to avoid the image stretched problem. (I0e04e)
  • Fixed low framerate when using VideoCapture and Preview use cases with 16:9 aspect ratio on some Huawei devices. (If8c88, b/223643510)
  • Fixed camera open failure when Preview’s SurfaceProvider is not set. As part of the fix, Preview with no SurfaceProvider set will now not be configured into the camera capture session. (I99681)

Version 1.2.0-beta02

september twenty-one, 2022
androidx.camera:camera-*:1.2.0-beta02 embody exhaust. version 1.2.0-beta02 hold these entrust .
API Changes

  • Add API level requirement for setOutputImageRotationEnabled (I26e3e, b/240993561)

Bug Fixes

  • Disabled the workaround to flip the AF region horizontally of front cameras on Samsung Android T since the issue was fixed. (I05f69)
  • Fixed the black preview issue that happens when BOKEH extension is enabled on some Samsung devices and user switches the cameras. (If6168)

Version 1.2.0-beta01

august twenty-four, 2022
androidx.camera:camera-*:1.2.0-beta01 constitute release. translation 1.2.0-beta01 hold these commit .
New Features

  • New library camera-mlkit-vision. Easily integrate CameraX with many MLKit features, including barcode scanning, face detection, text detection, etc. Please find the sample code here.
  • New experimental Zero-Shutter Lag API. Optimizes capture pipeline to have better latency while keeping good image quality. When the capture mode is set to CAPTURE_MODE_ZERO_SHUTTER_LAG, the latency between the shutter button is clicked and the picture is taken is expected to be minimized, compared with other capture modes. On devices that don’t support ZERO_SHUTTER_LAG, it’ll fallback to CAPTURE_MODE_MINIMIZE_LATENCY.
  • Made ImageAnalysis.Analyzer and MLKitAnalyzer as official APIs.
  • Exposed API for setting location metadata to the saved video.
  • Rename ImageAnalysis.Analyzer#getTargetResolutionOverride() to ImageAnalysis.Analyzer#getDefaultTargetResolution().

Bug Fixes

  • Fixed Alps k61v1_basic_ref image capture issue. The captured JPEG images from HAL have incorrect Exif metadata. The Exif metadata doesn’t have the 0xffd9 or 0xffda tag to make ExifInterface correctly parse the attributes. Capturing the images in YUV format and then compressing them to JPEG output images to workaround this issue. (I45abb)

Version 1.2.0-alpha04

july twenty-seven, 2022
androidx.camera:camera-*:1.2.0-alpha04 equal free. version 1.2.0-alpha04 control these entrust .
API Changes

  • Rename ImageAnalysis.Analyzer#getTargetResolutionOverride() to ImageAnalysis.Analyzer#getDefaultTargetResolution(). The behavior is also changed so that the value returned by this method can be overridden by the value of ImageAnalysis#setTargetResolution(). (If1d36)
  • Exposed API for setting location metadata to the saved video. An android.location.Location object can be set via new API androidx.camera.video.OutputOptions.Builder.setLocation(Location). (I313a0, b/204197544)

Bug Fixes

  • Fix the issue to take picture with unbind preview (Ie70b6, b/235119898)
  • Fixed crash in Recorder when attempting to record while audio source is unavailable. (I9f652)

Version 1.2.0-alpha03

june twenty-nine, 2022
androidx.camera:camera-*:1.2.0-alpha03 embody exhaust. translation 1.2.0-alpha03 contain these commit .
API Changes

  • Removed the experimental annotation for ImageAnalysis.Analyzer and MLKitAnalyzer. (I0ff22)

Bug Fixes

  • Added auto focus default timeout 5000ms that will complete the AF part with isFocusSuccessful false if the FocusMeteringAction is not cancelled and the AF part is not converged in the duration. (Ibc2e3)
  • Fix the issue to take picture with unbind preview (I1d3a2, b/235119898)
  • Enabled advanced extender implementation and update the CameraX support extensions-interface version to 1.2 (I92256)

Version 1.2.0-alpha02

june one, 2022
androidx.camera:camera-*:1.2.0-alpha02 be publish. adaptation 1.2.0-alpha02 contain these perpetrate .
New Features

  • Expose CameraX Zero-Shutter Lag API as experimental.

API Changes

  • Add new capture mode CAPTURE_MODE_ZERO_SHUTTER_LAG in ImageCapture and add isZslSupported in CameraInfo to query the device capability. CAPTURE_MODE_ZERO_SHUTTER_LAG mode is aiming to provide the minimum latency for instant capture. It is implemented based on a ring buffer, which caches intermediate capture results for later reprocessing when the user presses buttons to take pictures. If {@link VideoCapture} is bound or flash mode is not OFF or OEM Extension is ON, this mode will be disabled automatically. (I9ae74)
  • Add ImageAnalysis.getBackgroundExecutor() method (Icc945)

Bug Fixes

  • Fixed ImageCapture takePicture method turns torch off on the reported devices. (Ib5eb5, b/228272227)
  • Fixed a bug where AssertionError not being handled when getting the CONTROL_ZOOM_RATIO_RANGE characteristic.(/Ia248a, b/231701345)

Version 1.2.0-alpha01

may eighteen, 2022
androidx.camera:camera-*:1.2.0-alpha01 be release. adaptation 1.2.0-alpha01 check these invest .
New Features

  • New library camera-mlkit-vision is launched

Bug Fixes

  • Fixed QualitySelector fails to record a UHD video when a fallback strategy is enabled. The issue happens when VideoCapture is bound with ImageCapture and Preview on a FULL or higher hardware level camera device. A fallback strategy of QualitySelector causes VideoCapture incorrectly to get a FHD resolution. UHD resolution is actually supported for this use case combination and should be adopted. (I0e788, b/230651237)
  • Fixed NullPointerException on ImageCapture.takePicture(). (I92366, b/230454568, b/229766155)
  • Fix async pause behavior of androidx.camera.video.Recorder (Ia8ce8)

Camera-Camera2, Camera-Core, Camera-Lifecycle, & Camera-Video Version 1.1.0

Version 1.1.0

june twenty-nine, 2022
androidx.camera:camera-*:1.1.0 constitute free. version 1.1.0 contain these commit .
Important changes since 1.0.0

  • Landed View, Extension and Video Capture libraries as their first RC version. From 1.1.0-beta01, all CameraX libraries will align the same version number. This will help developers track versions much easier and reduce the complexity of large version compatibility matrices.
  • Introduced new public APIs and features which including:
  • Add the official camera-video library to support video capture use cases.
  • YUV to RGB conversion and rotation capability (ImageAnalysis.Builder.setOutputImageRotationEnabled and setOutputImageFormat)
  • Support multi-window mode by allowing CameraX applications to resume the camera when the camera is interrupted by another app and focus is back.
  • Ensures CameraX works well in foldable devices by fixing some preview issues.
  • Added a CameraState API that will be exposed through CameraInfo.
  • Added an API ProcessCameraProvider.getAvailableCameraInfos() to directly retrieve information about the available cameras
  • Output JPEG format for ImageCapture#OnImageCapturedCallback when Extensions are enabled.
  • Added a API isFocusMeteringSupported in CameraInfo which allows applications to check if the given FocusMeteringAction is supported on current camera or not.
  • Exposed getResolutionInfo API to provide the resolution information for Preview, ImageCapture and ImageAnalysis.
  • Added a new API ImageCapture.Builder#setJpegQuality to allow changing the output JPEG image compression quality when taking pictures.
  • Added CameraSelector#filter to the public API to filter a list of CameraInfos based on a CameraSelector.
  • Added Camera2CameraControl.clearCaptureRequestOptions for clearing the existing capture request options.
  • Added an experimental API for using CameraController with external image processing libraries. e.g. MLKit
  • Added experimental API CameraInfo#getCameraSelector() which returns a CameraSelector unique to its camera
  • Promoted several experimental APIs to formal public APIs
  • Replaced annotation @Experimental with @RequiresOptIn to experimental APIs. For calling experimental APIs, use androidx.annotation.OptIn instead of deprecated androidx.annotation.experimental.UseExperimental.
  • Promoted the following experimental APIs to official APIs: CameraXConfig.Builder#setAvailableCamerasLimiter(), CameraXConfig.Builder#setMinimumLoggingLevel(), CameraXconfig.Builder#setSchedulerHandler(), CameraXConfig#getAvailableCamerasLimiter(), CameraXConfig#getMinimumLoggingLevel(), CameraXConfig#getCameraExecutor(), CameraXConfig#getSchedulerHandler(),
  • @ExperimentalCameraFilter APIs
  • experimental exposure compensation APIs.
  • Promoted the experimental UseCaseGroup API for camera-core, camera-lifecycle and camera-video. Added ViewPort#getLayoutDirection, ViewPort.Builder#setLayoutDirection and ViewPort.Builder#setScaleType for customizing viewport.
  • Promoted the ExperimentalUseCaseGroupLifecycle to formal public APIs.
  • Changes to the existing APIs
  • Renamed MediaStoreOutputOptions.getCollection to MediaStoreOutputOptions.getCollectionUri.
  • ActiveRecording has been renamed to “Recording” to reduce verbosity.
  • Changed QualitySelector creator API to a list-based API

Bug Fixes

  • Fixed YuvToJpegProcessor EOFException issue when extension mode is enabled and ImageCapture#CAPTURE_MODE_MAX_QUALITY mode is set.
  • Fixed codec configuration failed due to video recording is closing
  • Fixed stretched preview/video aspect ratio when recording at FHD
  • Fixed audio/video out of sync after pause and resume on some devices
  • Fixed the issue where flash is triggered during tap-to-focus (startFocusAndMetering) when flash mode is auto or always_on in low-light environment.

Version 1.1.0-rc02

june one, 2022
androidx.camera:camera-*:1.1.0-rc02 be exhaust. translation 1.1.0-rc02 contain these invest .
Bug Fixes

  • Fixed NullPointerException on ImageCapture.takePicture(). (I92366, b/230454568, b/229766155)
  • Fixed a bug where AssertionError not being handled when getting the CONTROL_ZOOM_RATIO_RANGE characteristic. (Ia248a, b/231701345)

Version 1.1.0-rc01

whitethorn eleven, 2022
androidx.camera:camera-*:1.1.0-rc01 be secrete. version 1.1.0-rc01 contain these entrust .
New Features

  • Release the first RC version for camera-video, camera-view, and camera-extension

Bug Fixes

  • Fixed an issue where the video codec wasn’t released when VideoCapture was unbound, causing subsequent uses of VideoCapture to fail on recording with MediaCodec.CodecException, especially on API 21-22 devices. (Ie7f68)
  • Fix captured images of CameraExtensionsActivity do not be deleted in ImageCaptureTest

Version 1.1.0-beta03

april six, 2022
androidx.camera:camera-*:1.1.0-beta03 embody unblock. translation 1.1.0-beta03 contain these entrust .
API Changes

  • Made CaptureRequestOptions constructor restricted. (I261b6)
  • Added an experimental API for using CameraController with external image processing libraries. e.g. MLKit (I4ea71)

Bug Fixes

  • Fixed the issue that preview becomes sideway in PreviewView when activity is not restarted after rotating devices in multi-window. (I1ea36, b/223488673)
  • Fix a multi-window issue that when focus changes back to the app it fails to resume the camera when (1) other high priority app opens a different camera (2) the device is Samsung Android 12 devices. (I7e9f2)
  • Workaround included for devices that crash when checking availability of flash. These devices will not have torch available. (If26a3, b/216667482)
  • Fix AbstractMethodError issue happened when apps use extensions and enable proguard. (I7cbaf, b/222726805)
  • Force disable bokeh extension mode on Motorola razr 5G device which will cause black preview screen issue. (I35d49)
  • Fixed audio/video out of sync after pause and resume on some Samsung devices pre-API 29. (I64622, b/202798609, b/202798572)
  • Fixed audio/video out of sync after pause and resume on Sony G3125. (I2a1a5, b/202799148)
  • Fixed a crash when the Recorder encountered an InvalidConfigException. However, this fix only prevents app from crashing, but doesn’t resolve the cause of the InvalidConfigException. If the Recorder still cannot be configured, applications will receive error callback when it starts recording. (I89c29, b/213617227)

External Contribution

  • updated :compose:ui:ui-test api (updateApi) due to test-coroutines-lib migration (I3366d)

Version 1.1.0-beta02

february twenty-three, 2022
androidx.camera:camera-*:1.1.0-beta02 exist let go of. adaptation 1.1.0-beta02 contain these commit .
API Changes

  • Add the ability to specify physical camera ID through
    Camera2Interop. (I5aed8)

Bug Fixes

  • Fixed the stretched preview issue on Oppo Find N (I7d004)
  • Fixed a Galaxy J7 Prime issue that the preview is distorted.
    (I4c500)
  • Use compatible bitrate to find video encoder.
    (d969052)

Version 1.1.0-beta01

january twenty-six, 2022
androidx.camera:camera-*:1.1.0-beta01 equal let go of. version 1.1.0-beta01 check these perpetrate .
New Features

  • From 1.1.0-beta01, all CameraX libraries will align the same version number. This will help developers track versions much easier and reduce the complexity of large version compatibility matrix.

API Changes

  • Added Camera2CameraControl.clearCaptureRequestOptions for
    clearing the existing capture request options. (Ifa07d)

Bug Fixes

  • Fixed the crash when recording the video on some pre-Android O(API 26) devices. (I88fdf, b/212328261)
  • Fixed the incorrect AF region issue when using cameraControl#startFocusAndMetering() on front lens-facing camera in Samsung devices (Ifbf59, b/210548792)
  • Use torch as flash on Pixel 3a/Pixel 3a XL to improve the speed and the captured image quality in dark (Ib12b6, b/211474332)
  • Enabled applications to resume the camera when camera
    is interrupted by other higher priority application in the
    multi-window mode and the focus changes back to the application.
    Please note that there could be some latency(1 second to 10 seconds or more) between focus changes and camera reopened due to some framework issue. (I4d092)

Version 1.1.0-alpha12

december fifteen, 2021
androidx.camera:camera-*:1.1.0-alpha12 exist turn. version 1.1.0-alpha12 control these invest .
API Changes

  • Removed unnecessary @RequiresApi(21) annotations from the inner classes/interfaces. (I8e286, b/204917951)
  • The quality constants and fallback strategy constants of QualitySelector have been changed to be represented by class objects. For example, QualitySelector.QUALITY_HD is changed to Quality.HD, and QualitySelector.FALLBACK_STRATEGY_LOWER is changed to the instance returned by FallbackStrategy.lowerQualityOrHigherThan(Quality). The API used to create QualitySelector has been changed to a list-based API. The new API QualitySelector.fromOrderedList(List) will refer to the order of the input quality list instead of the order created by QualitySelector.Procedure. QualitySelector.Procedure class has been removed. (I43343)
  • PendingRecording.withEventListener() was removed and the event listener must now be passed to PendingRecording.start(). This event listener requirement is meant to encourage handling of asynchronous errors that are reported in the VideoRecordEvent.Finalize event. (I1e71d)
  • ActiveRecording has been renamed to Recording to reduce verbosity. (I77ceb)

Bug Fixes

  • Fixed the issue that captured photos in FLASH_AUTO mode is underexposed in dark conditions on Pixel 3a and Pixel 3a XL (I13f19, b/205373142)
  • Always use latest display size to determine the preview Resolution. (I4a694)
  • Filtered out cameras which do not have REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE. Cameras with REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE have the minimal set of capabilities that every camera device supports. Camera without REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE might be a camera to support special functionality and does not support standard color output. CameraX can’t support the Preview, ImageCapture, ImageAnalysis or VideoCapture use cases for those cameras. Therefore, those cameras should be filtered out to prevent incorrect usage. (Ib8cda)
  • CameraSelector#filter no longer throws an IllegalArgumentException when the result set is empty. (I27804)
  • Smarter heuristics are now used to select encoder settings based on OEM specified profiles. (Iaeef0)
  • Fixed Preview will have interlaced color lines after start UHD video recording on Pixel1. (I833c6, b/205340278)

Version 1.1.0-alpha11

november seventeen, 2021
androidx.camera:camera-*:1.1.0-alpha11 constitute exhaust. version 1.1.0-alpha11 contain these invest .
API Changes

  • Added CameraSelector#filter to the public API to filter a list of CameraInfos based on a CameraSelector. (I105d0)
  • add setOutputImageRotationEnabled API for ImageAnalysis config. exploiter displace enable rotation for YUV/RGB picture buffer. The rotation academic degree constitute vitamin a relative rotation account base on detector rotation and target rotation to continue trope upfront .
  • add setOutputImageRotationEnabled API for ImageAnalysis config. user toilet enable rotation for YUV/RGB image fender. The rotation degree be a relative rotation calculate establish on detector rotation and target rotation to observe visualize upfront .
    add getSensorToBufferTransformMatrix API indium ImageInfo. The render matrix embody a map from detector coordinate to buffer coordinate, which be, from the prize of CameraCharacteristics.SENSOR_INFO_ACTIVE_ARRAY_SIZE to (0, 0,
    image.getWidth, image.getHeight)
    . The matrix can embody use to map the organize from one { UseCase } to another. For model, map align of the font detected with ImageAnalysis to preview. ( I9ff1e )
  • add ampere new API ImageCapture.Builder # setJpegQuality to allow change the end product JPEG image compression choice when accept picture. ( I8dcf4 )
  • rename MediaStoreOutputOptions.getCollection to MediaStoreOutputOptions.getCollectionUri. ( I16639 )

Bug Fixes

  • Fixed the issue where flash being triggered during
    tap-to-focus (startFocusAndMetering) when flash mode is auto or
    always_on in low-light environment. (Id4c11)
  • Disabled HDR+ on Pixel 2 XL / Pixel 3 XL in
    MINIMIZE_LATENCY mode to reduce latency. (Ib6270, b/203505523)

External Contribution

Version 1.1.0-alpha10

october thirteen, 2021
androidx.camera:camera-*:1.1.0-alpha10 be publish. translation 1.1.0-alpha10 contain these perpetrate .
New Features

  • Released androidx.camera:camera-video:1.1.0-alpha10 as the first alpha version for Video officially. There are several known issues to be fixed in the later releases.

API Changes

  • Added @RequiresApi(21) annotation to all CameraX classes
    and dropped minSdkVersion from AndroidManifest.xml. This will allow
    camera-core to be easily integrated into applications that have a
    minSdkVersion less than 21, but want to conditionally use code paths
    that rely on API 21 and higher. For any application with
    minSdkVersion 21 or higher, this change requires no action. (Ie7f2e, b/200599470)

Bug Fixes

  • Throw an InitializationException to make the app be able to gracefully handle the AssertionError happened when creating CameraCharacteristics. (Ibec79)

Version 1.1.0-alpha09

september twenty-nine, 2021
androidx.camera:camera-camera2:1.1.0-alpha09, androidx.camera:camera-core:1.1.0-alpha09, and androidx.camera:camera-lifecycle:1.1.0-alpha09 be secrete. version 1.1.0-alpha09 contain these commit .
API Changes

  • ExperimentalUseCaseGroup annotation is removed now that the APIs are no longer experimental. (I01ef5)

Bug Fixes

  • Fix the issue where the captured photos are blurred
    in MAXIMIZE_QUALITY mode. (I173a9, b/193823892)
  • Fixed a Samsung Galaxy J5 issue that camera gets stuck after taking pictures with flash on/auto in dark environment (I3aab9)
  • When cropping is needed for ImageCapture, compressing the output cropped image with the specified JPEG quality level according to the set capture mode. If the capture mode is CAPTURE_MODE_MINIMIZE_LATENCY, the JPEG compression quality will be 95. If the capture mode is CAPTURE_MODE_MAXIMIZE_QUALITY, the JPEG compression quality will be 100. (Ieb37c, b/142856426)

Version 1.1.0-alpha08

august eighteen, 2021
androidx.camera:camera-camera2:1.1.0-alpha08, androidx.camera:camera-core:1.1.0-alpha08, and androidx.camera:camera-lifecycle:1.1.0-alpha08 equal exhaust. version 1.1.0-alpha08 check these entrust .
New Features

  • Add setOutputImageFormat API for image analysis config. User
    can select ImageAnalysis.OUTPUT_IMAGE_FORMAT_YUV_420_888 or
    ImageAnalysis.OUTPUT_IMAGE_FORMAT_RGBA_8888. By default,
    ImageAnalysis.OUTPUT_IMAGE_FORMAT_YUV_420_888 will be selected. (I7902d)

API Changes

  • ExperimentalUseCaseGroupLifecycle annotation is removed now that the APIs are no longer experimental. (I17b85)

Bug Fixes

  • Fixed Preview screen is too bright on the Huawei P20 Lite. This problem only occurs when certain special Preview resolutions are used together with a large zoom in value. (Idefce, b/192129158)
  • Fixed an issue that flash is not working on some devices when setting flash
    mode to FLASH_MODE_ON shortly followed by taking pictures. (Ieb49b)
  • Fixed the issue where Preview will halt for a while when taking pictures if VideoCapture, ImageCapture and Preview are bound. (I56197, b/193864120)
  • Allows ImageAnalysis to select a resolution larger than 1080p. A LIMITED-level above device can support a RECORD size resolution for ImageAnalysis when it is bound together with Preview and ImageCapture. The trade-off is the selected resolution for the ImageCapture will also need to be a RECORD size resolution. To successfully select a RECORD size resolution for ImageAnalysis, a RECORD size target resolution should be set on both ImageCapture and ImageAnalysis. This indicates that the application clearly understands the trade-off and prefers the ImageAnalysis to have a larger resolution rather than the ImageCapture to have a MAXIMUM resolution. For the definitions of RECORD, MAXIMUM sizes and more details see https://suanha.org/reference/android/hardware/camera2/CameraDevice#regular-capture. The RECORD size refers to the camera device’s maximum supported recording resolution, as determined by CamcorderProfile. The MAXIMUM size refers to the camera device’s maximum output resolution for that format or target from StreamConfigurationMap.getOutputSizes(int). (I1ee97, b/192911449)
  • Add the Exif info to the captured image. (I01ff0, b/193342619)
  • In ImageCapture, return the URI of the saved image if the saving location is File. (Ib5b49, b/149241379)
  • Fixed an issue that captured images with flash is dark on many devices. (I4e510)

Version 1.1.0-alpha07

july twenty-one, 2021
androidx.camera:camera-camera2:1.1.0-alpha07, androidx.camera:camera-core:1.1.0-alpha07, and androidx.camera:camera-lifecycle:1.1.0-alpha07 be unblock. version 1.1.0-alpha07 hold these commit .
Bug Fixes

  • Fixed a Samsung Galaxy Note 5 issue that camera gets
    stuck after taking pictures with flash on/auto in dark
    environment (If6871)
  • Fixed YuvToJpegProcessor EOFException issue when extension mode is enabled and ImageCapture#CAPTURE_MODE_MAX_QUALITY mode is set. (I538bd, b/192017012)

Version 1.1.0-alpha06

june thirty, 2021
androidx.camera:camera-camera2:1.1.0-alpha06, androidx.camera:camera-core:1.1.0-alpha06, and androidx.camera:camera-lifecycle:1.1.0-alpha06 embody release. interpretation 1.1.0-alpha06 contain these entrust .
API Changes

  • Promote the experimental exposure compensation APIs for
    camera-core (I08ee8)
  • Added a API isFocusMeteringSupported in CameraInfo which
    allows applications to check if the given FocusMeteringAction is
    supported on current camera or not. (Ib45ae, b/188606490)
  • Exposed getResolutionInfo API to provide the resolution information for Preview, ImageCapture and ImageAnalysis. (I2b613, b/188600718)
  • Promoted the following experimental APIs to official APIs:
    CameraXConfig.Builder#setAvailableCamerasLimiter(),
    CameraXConfig.Builder#setMinimumLoggingLevel(),
    CameraXconfig.Builder#setSchedulerHandler(),
    CameraXConfig#getAvailableCamerasLimiter(),
    CameraXConfig#getMinimumLoggingLevel(),
    CameraXConfig#getCameraExecutor(),
    CameraXConfig#getSchedulerHandler(). (I2ade2)
  • Exposed the CameraProvider interface to provide access to a set of cameras. (I1a7b1)
  • Promote the experimental UseCaseGroup API for camera-core, camera-lifecycle and camera-video. Added ViewPort#getLayoutDirection, ViewPort.Builder#setLayoutDirection and ViewPort.Builder#setScaleType for customizing viewport. (I7cee8)

Version 1.1.0-alpha05

june two, 2021
androidx.camera:camera-camera2:1.1.0-alpha05, androidx.camera:camera-core:1.1.0-alpha05, and androidx.camera:camera-lifecycle:1.1.0-alpha05 cost publish. translation 1.1.0-alpha05 hold these commit .
API Changes

  • Removed Camera2CameraFilter class. Suggest to select camera by
    CameraFilter and retrieve CameraCharacteristics or other Camera2 related
    information through Camera2CameraInfo if needed. (Ib887c)
  • ExperimentalCameraFilter APIs are now out of experimental
    stage and become formal APIs. They can be used without annotated OptIn. (I4bc94)
  • Added camera state API that’s exposed through CameraInfo#getCameraState(). (Ia86b4)
  • Added experimental API CameraInfo#getCameraSelector() which returns a CameraSelector unique to its camera (I77f9f)

Bug Fixes

  • Fixed the issue that ListenableFuture returned in
    setZoomRatio and setLinearZoom cannot complete on some android
    11 devices (I716d7)
  • Speed up Camera switching and reduce the error happen rate of the camera device (I34c99)
  • Replaced ExperimentalUseCaseGroupLifecycle with
    ExperimentalUseCaseGroup. (I3b2ef, b/159033688)

Version 1.1.0-alpha04

april twenty-one, 2021
androidx.camera:camera-camera2:1.1.0-alpha04, androidx.camera:camera-core:1.1.0-alpha04, and androidx.camera:camera-lifecycle:1.1.0-alpha04 be release. version 1.1.0-alpha04 incorporate these give .
Bug Fixes

  • Fixed a memory leak caused by multiple threads concurrently accessing the same collection. The memory leak may cause the Activity or Fragment to be retained by a Preview instance. (I7b4b8)
  • Replaced annotation @Experimental with @RequiresOptIn to experimental APIs. For calling experimental APIs, use androidx.annotation.OptIn instead of deprecated androidx.annotation.experimental.UseExperimental. (Iff226)
  • Fixed ImageCapture with flash On/Auto takes washed out images on Samsung Galaxy S7. (I30001)
  • Added a CameraState API that will be exposed through CameraInfo. (I75392)

Version 1.1.0-alpha03

march twenty-four, 2021
androidx.camera:camera-camera2:1.1.0-alpha03, androidx.camera:camera-core:1.1.0-alpha03, and androidx.camera:camera-lifecycle:1.1.0-alpha03 be secrete. adaptation 1.1.0-alpha03 incorporate these commit .
Bug Fixes

  • Output JPEG format for ImageCapture#OnImageCapturedCallback when Extensions modes is enabled. (I0d7b1)
  • Fixed initialization failure on UMIDIGI BISON devices (I57d9e, b/180818665)
  • Fixed Samsung A3 stretched preview in PreviewView. (Iacb30, b/180121821)

Version 1.1.0-alpha02

february twenty-four, 2021
androidx.camera:camera-camera2:1.1.0-alpha02, androidx.camera:camera-core:1.1.0-alpha02, and androidx.camera:camera-lifecycle:1.1.0-alpha02 be release. translation 1.1.0-alpha02 contain these entrust .
API Changes

  • Added an API ProcessCameraProvider.getAvailableCameraInfos() to directly retrieve information about the available cameras, which are either all of the device’s cameras, or those selected by the CameraSelector provided in CameraXConfig.Builder.setAvailableCamerasLimiter(CameraSelector). (Ieac08)

Bug Fixes

  • CameraX now tries to force open a camera on the initial attempt, this may result in CameraX stealing the camera away from other camera clients when its app has a higher priority. (Iab069, b/175820568)
  • Fixed the Robolectric test failure when
    setAvailableCamerasLimiter is used in CameraXConfig. (Ice307)
  • This change catches the exception when the image queue is maxed out in ImageAnalysis. So instead of crashing, you may notice other use cases being frozen or sluggish. e.g. frozen/sluggish preview. (Ic12da, b/175851631)
  • Fixed ExtensionsErrorListener to report errors when only Preview or ImageCapture is bound. (I5ae39)
  • Fixed ImageCapture performance regression by removing the validation of image saved location before taking a picture. After making this change, if the save destination is invalid, it will take longer to get the failure response because it will try to save the image after the photo is taken. (I1fd4e, b/177061560)
  • Fixed ImageCapture performance regression with “File” type OutputFileOptions. (I5164a, b/177061560)
  • Documentation updated to recommend against using
    ProcessCameraProvider.configureInstance(...) from
    library code. (Ib8a9f)

Version 1.1.0-alpha01

january twenty-seven, 2021
androidx.camera:camera-camera2:1.1.0-alpha01, androidx.camera:camera-core:1.1.0-alpha01, and androidx.camera:camera-lifecycle:1.1.0-alpha01 be release. version 1.1.0-alpha01 contain these commit .
Bug Fixes

  • Workaround included for intermittent corrupt image data in JPEGs on SM-G930T back-facing camera. (I52001, b/159831206)
  • Fixed IllegalArgumentException issue that happened when all preview supported sizes are smaller than 640×480 and display size is larger than 640×480. (I2a63c, b/150506192)
  • Resources in libraries with no explicitly declared public resources
    (ex. via public.xml) are now private by default. (Ia1dcc, b/170882230)

Camera-Camera2, Camera-Core, & Camera-Lifecycle Version 1.0.2

Version 1.0.2

september twenty-nine, 2021
androidx.camera:camera-camera2:1.0.2, androidx.camera:camera-core:1.0.2, and androidx.camera:camera-lifecycle:1.0.2 be secrete. adaptation 1.0.2 incorporate these give .
Bug Fixes

  • Fix the issue where the captured photos are blurred
    in MAXIMIZE_QUALITY mode. (I173a9, b/193823892)
  • Fixed a issue that captured image with flash is dark on
    many devices. (I4e510)

Camera-Camera2, Camera-Core, & Camera-Lifecycle Version 1.0.1

Version 1.0.1

july twenty-one, 2021
androidx.camera:camera-camera2:1.0.1, androidx.camera:camera-core:1.0.1, and androidx.camera:camera-lifecycle:1.0.1 be let go of. version 1.0.1 contain these invest .
Bug Fixes

  • fixed the emergence that the ListenableFuture hark back inch setZoomRatio and setLinearZoom can not complete on some android eleven device ( I716d7 )
  • fix the publish that the camera get perplex at close television camera state on some device and lawsuit black preview. ( I34c99 )

Camera-Camera2, Camera-Core, & Camera-Lifecycle Version 1.0.0

Note: raw interpretation of AndroidX library now correctly reflect implementation colony versus api dependence. If your project trust along associate in nursing implicit addiction expose through associate in nursing implementation dependence in version 1.0.0, you must explicitly count on that addiction indium your build.gradle .

Version 1.0.0

may five, 2021
androidx.camera:camera-camera2:1.0.0, androidx.camera:camera-core:1.0.0, and androidx.camera:camera-lifecycle:1.0.0 constitute release. version 1.0.0 contain these entrust .
Major features of 1.0.0

  • CameraX supports Preview, ImageCapture, and Analysis
  • CameraX manages the camera lifecycle within an easy to use API
  • CameraX aims to provide a compatibility layer that fixes many issues in the Android Camera Ecosystem

Known Issues

  • See Known Issue list

Version 1.0.0-rc05

april twenty-one, 2021
androidx.camera:camera-camera2:1.0.0-rc05, androidx.camera:camera-core:1.0.0-rc05, and androidx.camera:camera-lifecycle:1.0.0-rc05 embody release. translation 1.0.0-rc05 hold these perpetrate .
Bug Fixes

  • Fixed ImageCapture with flash On/Auto takes washed out images on Samsung Galaxy S7. (I30001)

Version 1.0.0-rc04

parade twenty-four, 2021
androidx.camera:camera-camera2:1.0.0-rc04, androidx.camera:camera-core:1.0.0-rc04, and androidx.camera:camera-lifecycle:1.0.0-rc04 be release. version 1.0.0-rc04 hold these commit .
Bug Fixes

  • Fixed initialization failure on UMIDIGI BISON devices (I57d9e, b/180818665)

Version 1.0.0-rc03

february twenty-four, 2021
androidx.camera:camera-camera2:1.0.0-rc03, androidx.camera:camera-core:1.0.0-rc03, and androidx.camera:camera-lifecycle:1.0.0-rc03 cost free. translation 1.0.0-rc03 check these invest .
Bug Fixes

  • Fix format error in the document of ProcessCameraProvider#getInstance
  • Fixed the Robolectric test failure when setAvailableCamerasLimiter is used in CameraXConfig.
  • Fixed ImageCapture performance regression by removing the validation of image saved location before taking a picture. After making this change, if the save destination is invalid, it will take longer to get the failure response because it will try to save the image after the photo is taken
  • This change catches the exception when the image queue is maxed out in ImageAnalysis. So instead of crash, you may notice other use cases being frozen or sluggish. e.g. frozen/sluggish preview.
  • Workaround included for intermittent corrupt image data in JPEGs on SM-G930T back-facing camera. (I52001, b/159831206)
  • This change catches the exception when the image queue is maxed out in ImageAnalysis. So instead of crashing, you may notice other use cases being frozen or sluggish. e.g. frozen/sluggish preview. (Ic12da, b/175851631)
  • Fixed the Robolectric test failure when
    setAvailableCamerasLimiter is used in CameraXConfig. (Ice307)
  • Fixed ImageCapture performance regression by removing the validation of image saved location before taking a picture. After making this change, if the save destination is invalid, it will take longer to get the failure response because it will try to save the image after the photo is taken. (I1fd4e, b/177061560)
  • Fixed ImageCapture performance regression with “File” type OutputFileOptions. (I5164a, b/177061560)

Version 1.0.0-rc02

january twenty-seven, 2021
androidx.camera:camera-camera2:1.0.0-rc02, androidx.camera:camera-core:1.0.0-rc02, and androidx.camera:camera-lifecycle:1.0.0-rc02 be release. version 1.0.0-rc02 contain these entrust .
Bug Fixes

  • Fixed IllegalArgumentException issue happened when all preview supported sizes are smaller than 640×480 and display size is larger than 640×480. (b/150506192)
  • terminus ad quem act of camera reopen try. while undertake to recover from certains topic when open the television camera, CameraX will no long attempt to reopen the camera indefinitely, rather information technology volition stop consonant after rehear for ten second. I435d2
  • pay back IllegalArgumentException offspring that happen when all preview digest size embody modest than 640×480 and display size be large than 640×480. ( I2a63c, b/150506192 )

Version 1.0.0-rc01

december sixteen, 2020
androidx.camera:camera-camera2:1.0.0-rc01, androidx.camera:camera-core:1.0.0-rc01, and androidx.camera:camera-lifecycle:1.0.0-rc01 be release. version 1.0.0-rc01 check these perpetrate .
API Changes

  • Changed CameraFilter and Camera2Filter to take in CameraInfo. (I6883d)
  • Added experimental class Camera2CameraControl to allow interoperating with Camera2 APIs
    dynamically. (I45cf3)
  • Renamed Camera2CameraInfo#fromCameraInfo to #from. (Ia2bd6)
  • Added an experimental setAvailableCamerasLimiter API to
    CameraXConfig to allow apps to optimize the initialization latency
    by avoiding initializing unused cameras. (I6cf88)
  • Added experimental method CameraXConfig.Builder#setMinimumLoggingLevel() to allow setting a minimum logging level for CameraX logs. When not set, it defaults to Log#DEBUG. (Ic3245)

Bug Fixes

  • Workaround included for intermittent corrupt image data in
    JPEGs on SM-G930V back-facing camera. (I5aca5, b/159831206)
  • Fixed the issue that taking pictures doesn’t receive results when flash is always/on
    and the environment is dark on Samsung SM-A716 devices. (If98b2, b/172036589)
  • Fixed the issue that the Preview cannot be stopped by calling Preview.setSurfaceProvider(null). (I3ac18)
  • Fixed orientation issue when capturing 4:3 images on some devices. (I0e3fb, b/171492111)

Camera Camera2, Core, & Lifecycle Version 1.0.0-beta12

november eleven, 2020
androidx.camera:camera-camera2:1.0.0-beta12, androidx.camera:camera-core:1.0.0-beta12, and androidx.camera:camera-lifecycle:1.0.0-beta12 constitute turn. translation 1.0.0-beta12 contain these invest .
Bug Fixes

  • Disabled auto flash on Samsung A3 devices to fix the crash
    when taking a photo with auto flash AE mode on Samsung A3 devices. (Ia5fe3, b/157535165)
  • Fixed an issue where the preview was stretched on Nexus 4 devices running Android L (API levels 21 and 22). (I4d407, b/158749159)
  • OnImageCapturedCallback#onCaptureSuccess base class
    implementation no longer closes the image. This is for preventing
    unexpected behavior to developers. Developers should not rely on
    super.onCaptureSuccess to close the image. (Ifbf9c)
  • The androidx variant of the Experimental annotation has been
    deprecated to provide parity with Kotlin. It has been replaced by the
    RequiresOptIn annotation, and the Java-facing linter has been updated to
    support both the new Kotlin annotation and the new androidx variant. (I52495, b/151331381)

Camera-Camera2 Version 1.0.0-beta11

october fourteen, 2020
androidx.camera:camera-camera2:1.0.0-beta11 be let go of. version 1.0.0-beta11 contain these commit .
New Features

  • Supports android 11 CONTROL_ZOOM_RATIO API for zoom on
    android 11 or later devices which contains valid
    CONTROL_ZOOM_RATIO_RANGE. (I62cc6)

Bug Fixes

  • Fixed the NumberFormatException issue happened when the camera Id is a non-integer camera Id. (Ib2228)
  • Improved the latency of CameraX initialization and
    bindToLifecycle (I61dc5)
  • Creation of UseCases do not require initialization of CameraX
    to complete. All implementation specific configurations are set on
    UseCase once it is attached to a Camera instance which for the public
    API is ProcessCameraProvider.bindToLifecycle(). (Ia5411)
  • .getTargetRotation() will return Surface.ROTATION_0
    if called before being attached to a Camera instance unless a
    targetRotation has been set on the Builder or UseCase. (I80fcd)

Camera-Core Version 1.0.0-beta11

october fourteen, 2020
androidx.camera:camera-core:1.0.0-beta11 be release. translation 1.0.0-beta11 contain these commit .
New Features – back android eleven CONTROL_ZOOM_RATIO API for zoom on android eleven oregon late device which contain valid CONTROL_ZOOM_RATIO_RANGE. ( I62cc6 )
Bug Fixes

  • Fixed the NumberFormatException issue happened when the camera Id is a non-integer camera Id. (Ib2228)
  • Creation of UseCases do not require initialization of CameraX
    to complete. All implementation specific configurations are set on
    UseCase once it is attached to a Camera instance which for the public
    API is ProcessCameraProvider.bindToLifecycle(). (Ia5411)
  • .getTargetRotation() will return Surface.ROTATION_0
    if called before being attached to a Camera instance unless a
    targetRotation has been set on the Builder or UseCase. (I80fcd)

Camera-Core Version 1.0.0-beta10

september twenty-three, 2020
androidx.camera:camera-core:1.0.0-beta10 be publish. translation 1.0.0-beta10 contain these perpetrate .
Caution: please do not use Camera-Core Version 1.0.0-beta09 equally there be a know issue [ visualize hemipterous insect repair below ] around persona capture. please suffice not use this adaptation indium your application. rather practice Camera-Core Version 1.0.0-beta10 and above .
Bug Fixes

  • Fix bug in validating file save destination for image capture (I8c565, b/167697553)

Camera-Camera2 Version 1.0.0-beta10

september twenty-three, 2020
androidx.camera:camera-camera2:1.0.0-beta10 be release. version 1.0.0-beta10 contain these invest .
Bug Fixes

  • Release to support Camera-Core 1.0.0-beta10

Camera-Camera2 Version 1.0.0-beta09

september sixteen, 2020
androidx.camera:camera-camera2:1.0.0-beta09 be turn. version 1.0.0-beta09 hold these entrust .
Caution:Camera-Core Version 1.0.0-beta09 as there is a Known Issue around image capture. Please do not use this version in your applications. Instead use please dress not useas there embody deoxyadenosine monophosphate know consequence about effigy capture. please do not use this version in your application. alternatively use Camera-Core Version 1.0.0-beta10 and above .
API Changes

  • Instead of providing static methods, Camera2CameraInfo takes
    in a CameraInfo instance when created to retrieve Camera2 related
    information from. (I5b844)

Bug Fixes

  • Fixed target aspect ratio issue on tablet devices. A 16:9 size should be selected when the target aspect ratio is set as AspectRatio.RATIO_16_9. (Ib7fcf, b/151969438)
  • Throw an InitializationException to make the app be able to gracefully handle the AssertionError happened when creating CameraCharacteristics. (I89c8c, b/160524721)
  • Added experimental interfaces for ExposureCompensation (If96c7)

Camera-Core Version 1.0.0-beta09

september sixteen, 2020
androidx.camera:camera-core:1.0.0-beta09 be unblock. adaptation 1.0.0-beta09 incorporate these commit .
API Changes

  • fixed the bug where viewport is marked as non-null on UseCaseGroup. Developers should be able to create a viewport without setting a viewport. (Ie3d2e)
  • Added experimental interfaces for ExposureCompensation (If96c7)
  • Allow arbitrary target rotation for Preview. The transformation info is calculated and returned to user on-the-fly via a new TranformationInfoListener callback. (I21470)

Bug Fixes

  • Fixed the issue that flash on some devices would not turn off. It happens when the flash mode is set to FLASH_MODE_ON to take a picture, and is changed to FLASH_MODE_OFF when the flash is fired. The symptom is like torch mode enabled. (Ib4451, b/162568128)
  • Forced PreviewView to use TextureView if extension effect is enabled and the vendor library implementation needs to do a special process on the output surface. (I0c3cc)
  • Fixed the activity/fragment leak when an activity/fragment context is passed to ProcessCameraProvider.getInstance(Context).

Known Issues

  • When ViewPort is set, the crop rect of ImageCapture might be incorrect on devices who rotate the image buffer in HAL. This will be fixed in the next release.

Camera-Camera2 Version 1.0.0-beta08

august nineteen, 2020
androidx.camera:camera-camera2:1.0.0-beta08 equal unblock. interpretation 1.0.0-beta08 contain these entrust .
Bug Fixes

  • Optimized bindToLifecycle to run quickly on the main thread. (I1d57e)
  • DisplayOrientedMeteringPointFactory takes in a CameraInfo
    instance instead of a CameraSelector so there is a direct mapping to
    which Camera the factory will be generating points for. All classes
    which use DisplayOrientedMeteringPointFactory also take in a CameraInfo
    instance instead of CameraSelector. (I400c1)
  • Fixed auto-resolution aspect ratio size grouping issue that a 16:9 mod16 size (864×480) is selected when the target resolution setting is 2016×1080 and there is another 1920×1080 16:9 size supported. (I53167, b/159363774)
  • Fix the CameraControl issue where it’s unable to work by a race condition (I2279f, b/152333890, b/160714166)

Camera-Core Version 1.0.0-beta08

august nineteen, 2020
androidx.camera:camera-core:1.0.0-beta08 cost secrete. adaptation 1.0.0-beta08 incorporate these entrust .
API Changes

  • DisplayOrientedMeteringPointFactory takes in a CameraInfo
    instance instead of a CameraSelector so there is a direct mapping to
    which Camera the factory will be generating points for. All classes
    which use DisplayOrientedMeteringPointFactory also take in a CameraInfo
    instance instead of CameraSelector. (I400c1)

Bug Fixes

  • For image capture, overwrite the flip horizontal flag in metadata based on camera direction. (I28499)
  • Initialization should no longer crash when using a Context
    that does not return an Application object from
    Context.getApplicationContext(). (I3d3c9, b/160817073)

Camera-Camera2 Version 1.0.0-beta07

july twenty-two, 2020
androidx.camera:camera-camera2:1.0.0-beta07 be unblock. interpretation 1.0.0-beta07 check these commit .
Bug Fixes

  • Fixed the issue that the preview is stretched on android 5.0 legacy device. (I0c03a)
  • Excluded some JPEG supported sizes that will cause WYSIWYG issue on some devices. (Ib5128)

Camera-Core Version 1.0.0-beta07

july twenty-two, 2020
androidx.camera:camera-core:1.0.0-beta07 be secrete. version 1.0.0-beta07 check these perpetrate .
API Changes

  • Merge FIT_CENTER, FIT_START, and FIT_END fit style with FIT. FITmeans that the returned crop rect will be the max possible sensor rect. (Ia73c3)
  • Preview’s crop rect is configured by viewport. Only the area covered by the crop rect should be visible to end users. (I142a4)

Bug Fixes

  • Fixed the issue that the preview is stretched on android 5.0 legacy device. (I0c03a)
  • Fixed the ConcurrentModificationException exception
    issue when unbinding use cases. (I371c0)

Camera-Camera2 Version 1.0.0-beta06

june twenty-four, 2020
androidx.camera:camera-camera2:1.0.0-beta06 be free. adaptation 1.0.0-beta06 check these give .
API Changes

  • Added experimental interfaces for filtering cameras by camera
    ID and CameraCharacteristics. (I28f61)

Bug Fixes

  • Fixed the issue where startFocusAndMetering fails to
    focus successfully on Samsung Galaxy S7. (If3be7, b/159039233)
  • Fix the camera can’t be closed after quit the app. (I7a7b3)
  • Fix repeated camera switching breaks preview when using SurfaceView implementation of PreviewView (I920ce)
  • CameraControl#startFocusAndMetering will fail if none of the
    specified MeteringPoint can generate valid metering rectangles. (Id53ce)

Camera-Core Version 1.0.0-beta06

june twenty-four, 2020
androidx.camera:camera-core:1.0.0-beta06 be publish. version 1.0.0-beta06 check these give .
API Changes

  • Added experimental interfaces for filtering cameras by camera
    ID and CameraCharacteristics. (I28f61)

Bug Fixes

  • CameraX can now be configured with
    ProcessCameraProvider#configureInstance() before calling
    ProcessCameraProvider#getInstance(). This allows for customization of
    the CameraXConfig without requiring implementing CameraXConfig.Provider
    in the app’s Application class. (Ia1a8d)
  • CameraControl#startFocusAndMetering will fail if none of the
    specified MeteringPoint can generate valid metering rectangles. (Id53ce)

Camera-Camera2 Version 1.0.0-beta05

june ten, 2020
androidx.camera:camera-camera2:1.0.0-beta05 embody let go of. adaptation 1.0.0-beta05 contain these entrust .
Bug Fixes

  • Fix the crash on app startup when initialising CameraX while phone is in Do Not Disturb mode. An InitializationException contains a CameraUnavailableException that will be set to the ListenableFuture of the intialization result instead of crashing the application. (I9909a, b/149413835)
  • Fixed the crash when calling startFocusAndMetering
    on devices that CONTROL_AF_STATE is null. (Ife55e, b/157084254)

Camera-Core Version 1.0.0-beta05

june ten, 2020
androidx.camera:camera-core:1.0.0-beta05 be let go of. version 1.0.0-beta05 contain these perpetrate .
API Changes

  • Fix the crash on app startup when initialising CameraX while phone is in Do Not Disturb mode. An InitializationException contains a CameraUnavailableException will be set to the ListenableFuture of the intialization result instead of crashing the application. (I9909a, b/149413835)

Bug Fixes

  • Updated javadocs of setTargetResolution and setTargetRotation. (Iae16f)

Camera-Camera2 Version 1.0.0-beta04

whitethorn twenty-seven, 2020
androidx.camera:camera-camera2:1.0.0-beta04 be publish. interpretation 1.0.0-beta04 incorporate these invest .
Bug Fixes

  • Allowed applications to set any camera2 capture request parameters via Camera2Interop without causing a crash. Please note that if there are issues that arise as a result of overriding parameters. Stability and behaviour are not guaranteed when overriding parameters using Camera2Interop. (Ibe5a1, b/149103700)
  • Auto-initialization is fixed when using an app on a device that is using a pseudo-locale. (I3bef3, b/154767663)
  • Converted error log related to detached use case to a debug log on Camera2CameraImpl. (I1a565, b/154422490)
  • Fixed issue where image taken is too dark sometimes even though flash is fired. (I5d9fa, b/149729613)
  • Fix bug where buffer in ImageProxy from ImageCapture was not rewound (I0c455, b/153249512)
  • Fixed the issues where binding ImageCapture only: (1) Failed to take photos with MAX_QUALITY; (2) Generated bad Image quality because auto exposure does not work. (I17782, b/145326998)
  • Improved reliability of re-opening camera when CameraX is disconnected by another process or codepath stealing the camera (I1fbc3, b/153714651)

Camera-Core Version 1.0.0-beta04

whitethorn twenty-seven, 2020
androidx.camera:camera-core:1.0.0-beta04 be let go of. version 1.0.0-beta04 hold these entrust .
API Changes

  • Adds an experimental API, CameraXConfig.Builder#setSchedulerHandler() for setting the handler used internally by the CameraX camera stack. This new API along with CameraXConfig.Builder#setCameraExecutor() should allow full control over the threads being used by the CameraX camera stack. (I7bf32, b/121160431)

Bug Fixes

  • Fixes crash in ImageAnalysis where the ImageProxy is accessed after the ImageReaderProxy has been closed. This also makes it so that all ImageProxy received by the Analyzer must be closed before the ImageReaderProxy will be closed. (I4b299, b/145956416, b/154155377, b/156357269)
  • Removed the CameraInfo parameter from PreviewView#createSurfaceProvider(), PreviewView now internally retrieves it from the SurfaceRequest. (If18f0, b/154652477)
  • Auto-initialization is fixed when using an app on a device that is using a pseudo-locale. (I3bef3, b/154767663)
  • Fixed issue where image taken is too dark sometimes even though flash is fired. (I5d9fa, b/149729613)
  • Fix issue with ImageAnalysis where multiple calls to setAnalyzer/clearAnalyzer resulted in the analyzer not receiving images to analyze. (I6169f, b/151605317, b/153514544)
  • Fix bug where buffer in ImageProxy from ImageCapture was not rewound (I0c455, b/153249512)
  • Fixed the issue that the first camera in the supported list from CameraManager is not always selected to use. (I4c624, b/153418028)
  • Fixed intermittent crash caused by setting Preview.SurfaceProvider not releasing the previously requested surface. “java.lang.IllegalStateException: Camera surface session should only fail with request cancellation” (I8e4e7, b/155936225)

Camera-Camera2 Version 1.0.0-beta03

april fifteen, 2020
androidx.camera:camera-camera2:1.0.0-beta03 be publish. version 1.0.0-beta03 incorporate these commit .
Bug Fixes

  • Fixes to support the release of camera-core

Camera-Core Version 1.0.0-beta03

april fifteen, 2020
androidx.camera:camera-core:1.0.0-beta03 be let go of. adaptation 1.0.0-beta03 check these perpetrate .
Bug Fixes

  • Fixed regression from beta03 where calling bindToLifecycle() with zero UseCases would cause a thrown exception. This prevented retrieval of a Camera without binding a UseCase.

Camera-Camera2 Version 1.0.0-beta02

april one, 2020
androidx.camera:camera-camera2:1.0.0-beta02 be unblock. interpretation 1.0.0-beta02 contain these commit .
Bug Fixes

  • Fixed the ImageInfo.getRotationDegrees() from the ImageProxy produced by ImageCapture so that it matches the EXIF orientation rotational value. (Id4281, b/150802561)
  • Explicit ordering of CameraX dependencies within build.gradle is no longer required to use the default CameraX/Camera2 implementation. For cases where declaring strict dependencies is required, all CameraX dependencies can now be included in the build file. (I46e88)
  • Fixed the IllegalArgumentException issue happening on the devices where the display size is smaller than 640×480. (Ife3f2, b/150506192)
  • Fixed bindToLifecycle so that it only modifies the UseCase if it successfully binds. Previously when calling bindToLifecycle in order to do resolution calculations the UseCase is updated. Now it no longer needs to update the UseCase to do the calculations (I78d9e)

Camera-Core Version 1.0.0-beta02

april one, 2020
androidx.camera:camera-core:1.0.0-beta02 equal unblock. adaptation 1.0.0-beta02 check these commit .
Bug Fixes

  • Fixed the ImageInfo.getRotationDegrees() from the ImageProxy produced by ImageCapture so that it matches the EXIF orientation rotational value. (Id4281, b/150802561)
  • Fixed bindToLifecycle so that it only modifies the UseCase if it successfully binds. Previously when calling bindToLifecycle in order to do resolution calculations the UseCase is updated. Now it no longer needs to update the UseCase to do the calculations (I78d9e)
  • Fixed an issue where the Preview use case’s capture session wasn’t being updated when the preview surface changed after calling Preview.setSurfaceProvider() more than once.

Camera-Camera2 Version 1.0.0-beta01

february twenty-six, 2020
androidx.camera:camera-camera2:1.0.0-beta01 be unblock. version 1.0.0-beta01 hold these perpetrate .
Bug Fixes

  • Renamed SurfaceRequest.setSurface(Surface) to
    SurfaceRequest.provideSurface(Surface), and
    SurfaceRequest.setWillNotComplete() to
    SurfaceRequest.willNotProvideSurface(). (I224fe)
  • Fixed an issue with the aspect ratio of a saved image not being correct
    after changing the target rotation value using ImageCapture.setTargetRotation(). (I474ea, b/148763432)
  • Fixed initialization of app variants with ProGuard enabled by preserving the
    flag that sets the default CameraXConfig provider. (I2d6c1)

Camera-Core Version 1.0.0-beta01

february twenty-six, 2020
androidx.camera:camera-core:1.0.0-beta01 be free. version 1.0.0-beta01 check these perpetrate .
API Changes

  • Replaced the ListenableFuture on
    SurfaceRequest.provideSurface() with an Executor and Callback. This
    simplifies the API by no longer requiring handling of exceptions on
    provideSurface() and enforces that the provideSurface() callback cannot
    be cancelled. This is to prevent crashes on older devices caused by
    prematurely releasing surfaces. The SurfaceRequest.Result object is now used
    for tracking how a SurfaceRequest uses the provided Surface. (I7854b)
  • Renamed SurfaceRequest.setSurface(Surface) to
    SurfaceRequest.provideSurface(Surface) and
    SurfaceRequest.setWillNotComplete() to
    SurfaceRequest.willNotProvideSurface(). (I224fe)

Bug Fixes

  • Fixed an issue with the aspect ratio of a saved image not being correct
    after changing the target rotation value using ImageCapture.setTargetRotation(). (I474ea, b/148763432)
  • Fixed initialization of app variants with ProGuard enabled by preserving the
    flag that sets the default CameraXConfig provider. (I2d6c1)
  • Updated documentation for flash mode APIs to include
    possible values. (I4a3ec)

Camera-Camera2 Version 1.0.0-alpha10

february ten, 2020
androidx.camera:camera-camera2:1.0.0-alpha10 cost exhaust. translation 1.0.0-alpha10 hold these invest .
Bug Fixes

  • Improved stability on INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY devices by ensuring Surfaces are only retained for duration of use by Camera2. (I9dac2)
  • Fixed underexposed preview issue on LEGACY devices by adjusting CONTROL_AE_TARGET_FPS_RANGE properly. (1224638)

Camera-Core Version 1.0.0-alpha10

february ten, 2020
androidx.camera:camera-core:1.0.0-alpha10 exist secrete. version 1.0.0-alpha10 contain these perpetrate .
API Changes

  • Updated ImageCapture to allow saving images to Uri and OutputStream. Combined overloaded takePicture methods into one. Updated test app to use Uri as the canonical example. (Ia3bec)
  • Preview.PreviewSurfaceProvider has been renamed to Preview.SurfaceProvider. SurfaceProviders no longer require developers to create their own ListenableFuture, and providing a Surface is now done through a new SurfaceRequest object. The Preview.getPreviewSurfaceProvider() method has been removed due to its potential for misuse when Preview is paired with other classes such as PreviewView. (I20105)
  • Added getTargetRotation() and getTargetName() to Preview. (Iceee7)
  • Added getTargetRotation(), getBackpressureStrategy(), and getImageQueueDepth() in ImageAnalysis. (I9d6d9)
  • Added getTargetRotation() and getCaptureMode() in ImageCapture() (I5bc17)
  • The arguments that were previously passed in ImageCapture.OnImageSavedCallback.onError() and ImageCapture.OnImageCapturedCallback.onError() have now been replaced by a single argument ImageCaptureException, which still contains all the information that was previously passed.
  • The file argument previously passed in ImageCapture.OnImageSavedCallback.onImageSaved() has been removed. (I750d2)
  • Preview and ImageCapture classes are now marked final. (I2500b)
  • API updated, with getZoomRatio(), getMaxZoomRatio(),
    getMinZoomRatio(), and getLinearZoom() methods of CameraInfo merging
    into getZoomState() which returns a ZoomState instance. (Ib19fe)
  • Removed API fields OPTION_TARGET_CLASS and OPTION_TARGET_NAME
    from CameraXConfig as they are intended for internal library use only.
    Removed constructor for CameraXConfig.Builder. (I96912)
  • Removed requirement that app must extend Application in order
    to initialize CameraX. CameraX will now be initialized with a default
    Camera2 configuration as long as the camera-camera2 artifact is included
    in the application’s build.gradle. (I58ff5) (b/146923574)

Camera-Camera2 Version 1.0.0-alpha09

january twenty-two, 2020
androidx.camera:camera-camera2:1.0.0-alpha09 be unblock. adaptation 1.0.0-alpha09 check these give .
API changes

  • add camera2 interop path for excerpt vitamin a Camera2 camera id. You can infusion the television camera idaho from CameraInfo use Camera2CameraInfo.extractCameraId(). The following code sample express how to use this :
    Camera camera = provider.bindToLifecycle(...);
    String cameraId =
        Camera2CameraInfo.extractCameraId(camera.getCameraInfo());
    

    The Camera2CameraInfo class necessitate the ExperimentalCamera2Interop markerClass .

Camera-Core Version 1.0.0-alpha09

january twenty-two, 2020
androidx.camera:camera-core:1.0.0-alpha09 equal free. translation 1.0.0-alpha09 contain these commit .
API changes

  • The SurfaceOrientedMeteringPointFactory parameter useCaseForSurface was
    renamed to useCaseForAspectRatio and the reference documentation was
    expanded.
  • FocusMeteringAction.Builder.from() methods are replaced by the constructors
    FocusMeteringAction.Builder().
  • Removed
    DisplayOrientedMeteringPointFactory(android.content.Context, androidx.camera.core.CameraSelector, float, float).
    Applications should use the constructor that takes a Display parameter and
    pass in the current display.
  • Javadoc improvements for focus and metering APIs regarding MeteringMode and
    3A Flags, and usage of Display parameter.
  • Expanded the reference documentation for setZoomRatio and setLinearZoom.

Bug fixes

  • Fixed issues when closing then opening cameras resulting in “Precondition”
    check failure.
  • Fixed a ConcurrentModificationException that could occur when using torch
    and zoom APIs.
  • Fixed issue to now select resolutions closer to requested resolution when a
    mod16 dimensions size is available.
  • startFocusMetering and cancelFocusMetering APIs now behave as documented,
    with correct timing and potentially returning errors when they occur.
  • Fixed issue when a specific target resolution was requested with a crop aspect
    ratio on a device that doesn’t support such sizes. Now, a non-cropped size of
    sufficient resolution to bound the original request will be selected when
    available.

Camera-Camera2 Version 1.0.0-alpha08

december eighteen, 2019
androidx.camera:camera-camera2:1.0.0-alpha08 be secrete. adaptation 1.0.0-alpha08 hold these invest.

Known Issues

  • Not all Camera2 capture request options work when using the Camera2 interop. If the requested option is not supported, the session fails to start and an error like this may occur: 09-09 14:04:13.643 10117 26020 26036 E AndroidRuntime: java.lang.IllegalArgumentException: Unsupported session configuration combination

Bug Fixes

  • Fixed an issue in which a preview black screen occurred after rotating or switching the camera for API Levels 21 and 22.

API Changes

  • Experimental: Added a camera2 interop path for extracting the Camera ID.

Camera-Core Version 1.0.0-alpha08

december eighteen, 2019
androidx.camera:camera-core:1.0.0-alpha08 be turn. version 1.0.0-alpha08 check these commit .
Known Issues

  • Apps using the PreviewView or CameraView may have the wrong aspect ratio preview. This happens after pause or resume on some FULL devices, such as the Pixel2.

Bug Fixes

  • Updated the documentation for FocusMeteringAction and CameraControl.
  • Implemented TorchControl for enableTorch() and getTorchState().

API Changes

  • Hid IntDefs and moved IntDef constants outside of the IntDef definition.
  • Moved rotationDegrees from class OnImageCaptureCallback to ImageInfo.
  • Moved rotationDegrees from class Analyzer to ImageInfo.

Camera-Camera2 Version 1.0.0-alpha07

december four, 2019
androidx.camera:camera-camera2:1.0.0-alpha07 cost release. version 1.0.0-alpha07 of camera-camera2 incorporate these invest

  • Camera2Config is now available for use with initializing and configuring a Camera2-based implementation for CameraX. More details on how to use this in initialization are in the camera-core section of the release notes.
  • The camera2 interop functionally is now marked as experimental and moved to a separate package, androidx.camera.camera2.interop.

Camera-Core Version 1.0.0-alpha07

december four, 2019
androidx.camera:camera-core:1.0.0-alpha07 cost let go of. version 1.0.0-alpha07 of camera-core check these invest
Note that there are some substantial changes in this Alpha release as we prepare for Beta. We recommend you review the deepen and share any feedback you whitethorn have on the CameraX google group. For those developer use CameraX indiana apps that equal on the play shop, we commend wait for the formal beta passing earlier upgrade the library inside your application .
API changes

  • Important : CameraX low-level formatting have change. application should follow through CameraXConfig.Provider, and consumption the default Camera2Config provide aside androidx.camera.camera2. ampere typical use be :
    import androidx.camera.camera2.Camera2Config
    import androidx.camera.core.CameraXConfig
    
    public class MyCameraXApplication : Application(),  CameraXConfig.Provider {
        override fun getCameraXConfig(): CameraXConfig {
                return Camera2Config.defaultConfig(this)
        }
    }
    
  • The CameraX classify accept be remove. The bindToLifecycle(), unbind(), unbindAll(), isBound(), and hasCamera() previously supply aside the CameraX class call be now available via the ProcessCameraProvider .
  • vitamin a per-process case of ProcessCameraProvider be receive asynchronously use the static method acting ProcessCameraProvider.getInstance(), which recurrence ampere listenable future, which provide the ProcessCameraProvider on completion. here information technology be prove indiana onCreate() for angstrom typical custom. You displace place call to getInstance() late inch the activeness ’ south lifecycle to submit low-level formatting latency to vitamin a late time ( such equally when a user action open angstrom camera UI ) .
    import androidx.camera.lifecycle.ProcessCameraProvider
    import com.google.common.util.concurrent.ListenableFuture
    
    class MainActivity : AppCompatActivity() {
       private lateinit var cameraProviderFuture : ListenableFuture
       override fun onCreate(savedInstanceState: Bundle?) {
           cameraProviderFuture = ProcessCameraProvider.getInstance(this);
      }
    
  • ampere hearer can be lend to the ListenableFuture reelect by getInstance(). This guarantee the television camera provider displace be retrieve from the Future without blocking along Future.get()
    cameraProviderFuture.addListener(Runnable {
      val cameraProvider = cameraProviderFuture.get()
      cameraProvider.bindToLifecycle(...)
    }, ContextCompat.getMainExecutor(this))
    
  • television camera selection equal now dress aside ampere television camera picker, alternatively of per-use sheath
    val cameraSelector = CameraSelector.Builder().requireLensFacing(LensFacing.BACK).build()
    
  • CameraProvider.bindToLifecycle be give the lifecycle owner, the camera picker, and practice event, which be then bound to the give lifecycle owner and run for the selected television camera .
    cameraProvider.bindToLifecycle(this as LifecycleOwner,
           cameraSelector, preview, imageAnalysis)
    
  • use case “ Config ” classify be remove. alternatively, build use lawsuit directly, set option on each use case builder. For example :
    preview = Preview.Builder().setTargetAspectRatio(AspectRatio.RATIO_16_9).build()
    
  • The preview use case accept be update to accept angstrom surface produce and wield aside the application to guarantee android well practice. information technology be highly recommend to use the PreviewView opinion class provide in the camera-view box .
    preview.setPreviewSurfaceProvider(previewView.previewSurfaceProvider)
    
  • visit documentation for attach associate in nursing app-managed come on. inch these case the app manage the lifecycle of the open .
  • Important : The ImageAnalysis Analyzer method implementation must call image.close() on received images when finished using them. Otherwise, new images may not be received or the camera may stall, depending on back pressure setting. Refer to the reference docs for details.
  • ImageAnalysis ImageReaderMode cost now change to angstrom backpressure strategy intdef .
  • ImageProxy.getImage() exist score equally experimental. application should annotate custom for model via @androidx.camera.core.ExperimentalGetImage
  • The UIThread annotation prerequisite for the Analyzer suffer cost distant .
  • The ImageAnalysis.clearAnalyzer() function be lend for get rid of associate in nursing analyzer .
  • hearer with more than one method accept be rename to recall :
    • ImageCapture.OnImageCapturedListener is now ImageCapture.OnImageCapturedCallback
    • ImageCapture.OnImageSavedListener is now ImageCapture.OnImageSavedCallback
    • VideoCapture.OnVideoSavedListener is now VideoCapture.OnVideoSavedCallback
  • Enums have changed to IntDef
  • soar control condition hold be add :
    • CameraControl.setLinearZoom()
    • CameraControl.setZoomRatio()
    • CameraInfo.getLinearZoom()
    • CameraInfo.getMaxZoomRatio()
    • CameraInfo.getZoomRatio()
  • CameraInfo.hasFlashUnit() be add to decide if flash/torch hardware be present .
  • CameraInfo.isFlashAvailable() take be removed. flashlight override flash functionality. more detail constitute included indiana the reference documentation .
  • ImageCapture.Metadata battlefield cost replace by get/set/is accessors .
  • startFocusMetering and cancelFocusMetering now return ListenableFutures which represent the asynchronous operation of the call .
  • MeteringPoints be immediately serve vitamin a handle to meter action, and exist grow aside factory. Apps should use the exist factory preferably than customs factory .

Fixed issues

  • Fixed issue when taking a picture on resuming (after a previous pause had take pictures pending completion).
  • Known Issue: CameraControl.enableTorch() is functional but the returned ListenableFuture is always an immediate complete(success) future, even if there is no flash unit. Future versions will fix this to the final behavior: When there is no flash unit, enableTorch(true) fails immediately (won’t send request to CaptureSession), and TorchState remain Off.
  • Known Issue: startFocusAndMetering and cancelFocusAndMetering start and cancel focus metering, but return an immediately completed (success) future not representing the documented behavior. The FocusMeteringResult from ListenableFuture CameraControl.startFocusAndMetering() is a fake result which isFocusSuccessful() and is always “false,” differing from intended, documented behavior.
  • Known Issue: A metering point factory for use with PreviewView touch events is being developed. For now, apps connecting custom managed surfaces can use the existing metering point factories, and otherwise no touch focus functionality is available for PreviewView.

Camera-Camera2 and Camera-Core Version 1.0.0-alpha06

october nine, 2019
androidx.camera:camera-camera2:1.0.0-alpha06 and androidx.camera:camera-core:1.0.0-alpha06 be exhaust. These exist the perpetrate include indium camera-camera2:1.0.0-alpha06 and these are the commit include in camera-core:1.0.0-alpha06 .
New features
deepen to specify expression ratio :

  • setTargetAspectRatioMode() was added and accepts an enum argument. This sets the Aspect Ratio Mode with options RATIO_4_3 or RATIO_16_9 instead of an arbitrary aspect ratio. This closer reflects the fact that only certain aspect ratios are provided from the camera, rather than any arbitrary ratio.
    • Currently, the only available ratios are 16:9 and 4:3. In the case of 1:1, only certain devices have this available from the camera, and then only at limited resolutions. Applications designing a 1:1 interface or processing should use the more flexible 16:9 or 4:3 choices and crop the display or process a subregion.
    • These aspect ratios are oriented to use the maximum sensor area.
  • getTargetAspectRatio() was added to use case config APIs, returning the aspect ratio the use case output is targeted for.
  • The method setTargetAspectRatio(Rational aspectRatio) has been changed for ImageCapture to setTargetAspectRatioCustom(Rational aspectRatio). When set, the ImageCapture output crops accordingly.

executor apis

  • The following functions accept an executor parameter, which allows the app to control which executor the function runs on.
    • Preview.setOnPreviewOutputUpdateListener() API. If the executor is not present for that function, it executes on the main thread.
    • Preview.setOnPreviewOutputUpdateListener
    • FocusMeteringAction.Builder.setAutoFocusCallback
    • ImageAnalysis.setAnalyzer
    • ImageCapture.takePicture
    • CameraView.takePicture
    • CameraView.startRecording
    • VideoCapture.startRecording

CameraInfo add with check dart available and detector rotation apis

  • add CameraInfo and a getCameraInfo method, which give up apps to check if deoxyadenosine monophosphate lens facing CameraInfo be available and if angstrom brassy be available on that camera. For case :
    try {
        CameraInfo cameraInfo = CameraX.getCameraInfo(currentCameraLensFacing);
        LiveData isFlashAvailable = cameraInfo.isFlashAvailable();
        flashToggle.setVisibility(isFlashAvailable.getValue() ? View.VISIBLE : View.INVISIBLE);
    } catch (CameraInfoUnavailableException e) {
        Log.w(TAG, "Cannot get flash available information", e);
        flashToggle.setVisibility(View.VISIBLE);
    }
    
  • CameraInfo.getSensorRotationDegrees() equal add. information technology put up the television camera detector orientation relative to the device ’ sulfur natural orientation, operating room for public toilet, relative to associate in nursing orientation course described by deoxyadenosine monophosphate surface rotation ( which describe associate in nursing orientation relative to natural orientation course ) .

API changes and bug fixes

  • Aspect Ratios: For each use case, applications should call only one of setTargetResolution() or setTargetAspectRatio(). Calling both on the same builder returns an error.
    • In general it’s recommended to use setTargetAspectRatio() based on the application’s UI design. Specific resolutions are based on the use case. For example, preview is near screen resolutions and image capture provides high resolution stills. See the automatic resolutions table for more information.
    • Use setTargetResolution() for more specific cases, such as when minimum (to save computation) or maximum resolutions (for processing details) are required.
  • Executor API: Removed the setCallbackHandler() call from use case configuration APIs. Instead, applications can set the executor as a parameter in various other APIs that set a callback.
  • Updated null annotations for various functions.
  • Fixed an issue that caused java.lang.IllegalStateException at Camera$StateCallback.onError to be thrown when opening the camera.
  • Fixed issue where resolutions would be selected that were too small (less than 640×480) when app is requesting larger or default resolutions resulting in a blocky or blurry preview image. Applications that specifically need smaller resolutions can explicitly request them.
  • Fixed an issue where the camera would show black screen (failed to start the camera) after returning from an intent that launched another camera application.
  • Fixed a bug that threw the following error when apps are repeatedly started or stopped; java.lang.IllegalArgumentException: CaptureRequest contains unconfigured Input/Output Surface!
  • Fixed the following error that occurs when disabling ImageAnalysis: java.lang.IllegalStateException: maxImages (4) has already been acquired, call #close before acquiring more.
  • Added additional tests for camera disconnect flow.
  • Improved test system robustness when running back-to-back camera tests.

Camera-Camera2 and Camera-Core Version 1.0.0-alpha05

september five, 2019
androidx.camera:camera-camera2:1.0.0-alpha05 and androidx.camera:camera-core:1.0.0-alpha05 be free. These be the invest included in camera-camera2:1.0.0-alpha05 and these constitute the give include camera-core:1.0.0-alpha05 .

  • API exchange : rename consumption case error variable :
    • ImageCapture.UseCaseError is renamed ImageCapture.ImageCaptureError
    • VideoCapture.UseCaseError is renamed VideoCapture.VideoCaptureError
  • total CameraControl API w/Tap-to-Focus apis
    • add API to drive a CameraControl from CameraX for a camera, selected aside lens confront :
      CameraX.getCameraControl(LensFacing lensFacing)
    • add MeteringPointFactory, MeteringPoint, MeteringMode, and FocusMeteringAction to melt Tap-to-Focus :
      MeteringPointFactory factory = new SensorOrientedMeteringPointFactory(width, height);
      MeteringPoint point = factory.createPoint(x, y);
      FocusMeteringAction action = FocusMeteringAction.Builder.from(point,
                                       MeteringMode.AF_ONLY)
          .addPoint(point2, MeteringMode.AE_ONLY) // could have many
          .setAutoFocusCallback(new OnAutoFocusListener(){
              public void onFocusCompleted(boolean isSuccess) {
              }
          })
          // auto calling cancelFocusAndMetering in 5 sec.
          .setAutoCancelDuration(5, TimeUnit.Second)
          .build();
      
    • add API for CameraControl to begin and cancel focus meter :
      getCameraControl(lensFacing).startFocusAndMetering(action); getCameraControl(lensFacing).cancelFocusAndMetering();
    • total apis for meter point factory that serve translate tap coordinate to detector coordinate, free-base on opinion class :
      MeteringPointFactory factory = new TextureViewMeteringPointFactory(textureView); MeteringPointFactory factory = new DisplayOrientedMeteringPointFactory(context, lensFacing, viewWidth, viewHeight);
  • enforce bid the pursuit method acting on the main ( UI ) string, throw associate in nursing IllegalStateException when they be not. future adaptation will give up use along early togs and guarantee serialization .
    • CameraX.bindToLifecycle()
    • CameraX.unbind()
    • CameraX.unbindAll()
    • ImageAnalysis.setAnalyzer()
    • ImageAnalysis.getAnalyzer()
    • ImageAnalysis.removeAnalyzer()
    • Preview.removePreviewOutputListener()
    • Preview.getOnPreviewOutputUpdateListener()
    • Preview.setOnPreviewOutputUpdateListener()
  • assorted config context now accept null parameter and comparable getters whitethorn render nothing .
  • repair return when screen along copycat that make not subscribe AF/AE/AWB setting .
  • repair crash wiretap on rotation while analyze persona .
  • fixed bug where preview appear black on beginning ( no camera datum ), after rotation oregon switch between front and back television camera .
  • removed quiz for multiple coincident visualize analysis manipulation shell. To see compatibility, application should only attach a single double analysis use shell .
  • add initial robolectric test for bogus camera indium camera-testing cortege ( WIP ) .
  • Camera2Inititalizer test murder, angstrom information technology coverage be unclear/misleading .

Camera-Camera2 and Camera-Core Version 1.0.0-alpha04

august seven, 2019
androidx.camera:camera-camera2:1.0.0-alpha04 and androidx.camera:camera-core:1.0.0-alpha04 constitute publish. translation 1.0.0-alpha04 incorporate these commit .
Note: This adaptation be subject along the java eight programming language. please read use coffee eight linguistic process feature to memorize how to consumption information technology in your project .
New Features
transfer to view ratio and solution survival
CameraX ‘s goal be to successfully format a television camera session. This means CameraX compromise along resolution/aspect proportion establish along device capability, indium order to start adenine appropriate seance vitamin a information technology first goal, and sol demand request whitethorn not cost honor. This whitethorn embody due to :

  • Devices not supporting the requested resolution
  • Compatibility issues such as on LEGACY devices where certain resolutions must be used to operate correctly
  • On some devices, certain formats are only available at certain aspect ratios
  • A preference for a “nearest mod16” for JPEG or video encoding. See CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP

Although CameraX make and wangle the session, you should constantly check the return image size on the manipulation case output in your code and adjust accordingly .
approximately exchange rich person be name for determine resolution and expression proportion, intend to make the API more clear :

  • Preview use case is now considered to have a default 4:3 aspect ratio when none is set.
  • When CameraX internally considers changes to requested resolutions and aspect ratios based on device capability, it first tries to maintain the same aspect ratio (as determined by any of setTargetAspectRatio or setTargetResolution calls)
  • A “Nearest mod16” version of the resolution is considered as the same aspect ratio.

ImageAnalysis Non-Blocking mode

  • The behaviour of ImageReaderMode.ACQUIRE_LATEST_IMAGE is now non-blocking. It acquires the latest image in the queue, but discards unused images continuously to allow the camera pipeline to avoid blocking.
  • The analyzer can hold a single image indefinitely without stalling the pipeline.
  • If the application provides an executor which then blocks, the ImageAnalysis use case blocks.
  • The default executor set internally behaves as a non-blocking executor.

Bug Fixes

  • Fixed timeout issues waiting for 3A convergence when capturing images on devices with no auto-focus, auto exposure, and auto-whitebalance
  • Fixed issue when rapidly taking pictures with ImageCapture. Fixes error: java.lang.IllegalStateException: maxImages (2) has already been acquired
  • Fixed issue when setLensFacing was not called for a use case, resulting in java.lang.IllegalArgumentException: Unable to get camera ID for use case.
  • Fixed issue where LEGACY device required specific aspect ratio as maximum JPEG resolution
  • Fixed issue when backgrounding the app while camera is opening
  • Fixed issue on API < 25, removing error checkAndUpdateEglState: invalid current EGLDisplay
  • Fixed issue when unbinding preview after enabling and starting extensions
  • Build artifacts for camera-view and camera-extensions are now published as alpha versions

Camera-Camera2 and Camera-Core Version 1.0.0-alpha03

july two, 2019
androidx.camera:camera-core:1.0.0-alpha03 and androidx.camera:camera-camera2:1.0.0-alpha03 are free. version 1.0.0-alpha03 hold these commit .
Note: This version be subject along the coffee eight programming lyric. please read manipulation java eight linguistic process have to determine how to use information technology in your project .
API Changes

  • Added javadoc clarification for “target” in setTarget configuration calls

Camera-Core

  • Fixed unconfigured Input/Output Surface crash on rapid open/close or bind/unbind
  • Move to new Futures implementations
  • Test fixes for more robust testing
  • Core integration test now shows capture time for photos
  • Developed internal compat class for Executors
  • Timing test app capture images waits for previous to complete & improved stability

Extensions

  • Added versioning checks
  • Additional test coverage – extension event callbacks
  • Improvements for internally corresponding image and meta-data
  • Fixes to mode switching in test app

Camera-Camera2 and Camera-Core Version 1.0.0-alpha02

june five, 2019
androidx.camera:camera-core:1.0.0-alpha02 and androidx.camera:camera-camera2:1.0.0-alpha02 cost free. version 1.0.0-alpha02 contain these perpetrate .
Bug fixes

  • Fixed div by zero issue when using emulator
  • Fixed NullPointerException/Surface Abandoned error occurring on some devices when quickly taking photos while unbinding and rebinding use cases rapidly.
  • Fixed internal issue to ensure capture request updates affect all surfaces consistently
  • Stability improvements when restarting use cases in new app instances
  • Internal architecture changes to prepare for supporting executors in the API
  • Additional Javadoc clarifications on CameraX class and lifecycle management
  • Added instrumented testing for Antelope performance test app
  • Remove need for ‘-keepattributes Signature’ in app Proguard config

Camera-Camera2 and Camera-Core 1.0.0-alpha01

may seven, 2019
androidx.camera:camera-core:1.0.0-alpha01 and androidx.camera:camera-camera2:1.0.0-alpha01 cost release. adaptation 1.0.0-alpha01 incorporate these give .

Camera-Lifecycle Version 1.0.0-beta11

october fourteen, 2020
androidx.camera:camera-lifecycle:1.0.0-beta11 be secrete. translation 1.0.0-beta11 contain these perpetrate .
Bug Fixes

  • .getTargetRotation() will return Surface.ROTATION_0
    if called before being attached to a Camera instance unless a
    targetRotation has been set on the Builder or UseCase. (I80fcd)

Camera-Lifecycle Version 1.0.0-beta10

september twenty-three, 2020
androidx.camera:camera-lifecycle:1.0.0-beta10 be publish. version 1.0.0-beta10 incorporate these commit .
Bug Fixes

  • Release to support Camera-Core 1.0.0-beta10

Camera-Lifecycle Version 1.0.0-beta09

september sixteen, 2020
androidx.camera:camera-lifecycle:1.0.0-beta09 be let go of. version 1.0.0-beta09 check these perpetrate .

Camera-Lifecycle Version 1.0.0-beta08

august nineteen, 2020
androidx.camera:camera-lifecycle:1.0.0-beta08 be free. version 1.0.0-beta08 contain these commit .
Bug Fixes

  • Initialization should no longer crash when using a Context
    that does not return an Application object from
    Context.getApplicationContext(). (I3d3c9, b/160817073)

Camera-Lifecycle Version 1.0.0-beta07

july twenty-two, 2020
androidx.camera:camera-lifecycle:1.0.0-beta07 be free. adaptation 1.0.0-beta07 contain these commit .

Camera-Lifecycle Version 1.0.0-beta06

june twenty-four, 2020
androidx.camera:camera-lifecycle:1.0.0-beta06 be free. version 1.0.0-beta06 incorporate these give .
API Changes

  • CameraX can now be configured with
    ProcessCameraProvider#configureInstance() before calling
    ProcessCameraProvider#getInstance(). This allows for customization of
    the CameraXConfig without requiring implementing CameraXConfig.Provider
    in the app’s Application class. (Ia1a8d)

Camera-Lifecycle Version 1.0.0-beta05

june ten, 2020
androidx.camera:camera-lifecycle:1.0.0-beta05 be publish. adaptation 1.0.0-beta05 contain these perpetrate .
Bug Fixes

  • Fix the crash on app startup when initialising CameraX while phone is in Do Not Disturb mode. An InitializationException contains a CameraUnavailableException will be set to the ListenableFuture of the intialization result instead of crashing the application. (I9909a, b/149413835)

Camera-Lifecycle Version 1.0.0-beta04

may twenty-seven, 2020
androidx.camera:camera-lifecycle:1.0.0-beta04 equal turn. adaptation 1.0.0-beta04 control these entrust .

Camera-Lifecycle Version 1.0.0-beta03

april fifteen, 2020
androidx.camera:camera-lifecycle:1.0.0-beta03 embody free. adaptation 1.0.0-beta03 contain these commit .
Bug Fixes

  • Fixed regression from beta03 where calling bindToLifecycle() with zero UseCases would cause a thrown exception. This prevented retrieval of a Camera without binding a UseCase.
  • Fixes to support the release of camera-core

Camera-Lifecycle Version 1.0.0-beta01

february twenty-six, 2020
androidx.camera:camera-lifecycle:1.0.0-beta01 embody secrete. translation 1.0.0-beta01 contain these commit .
Bug Fixes

  • Fixed documentation to note that when obtaining a
    ProcessCameraProvider during initialization, a default configuration is
    used and that extending Application is optional. (I5e395)

Camera-Lifecycle Version 1.0.0-beta02

april one, 2020
androidx.camera:camera-lifecycle:1.0.0-beta02 embody exhaust. version 1.0.0-beta02 control these entrust .
Bug Fixes

  • Updated to support the bug fixes in the camera-camera2:1.0.0-beta02 and camera-core:1.0.0-beta02 artifacts.

Camera-Lifecycle Version 1.0.0-alpha10

february ten, 2020
androidx.camera:camera-lifecycle:1.0.0-alpha10 embody turn. version 1.0.0-alpha10 control these commit .
API Changes

  • Added @MainThread annotation to BindToLifecycle, unbind and unbindAll methods. (I990d2)

Camera-Lifecycle Version 1.0.0-alpha03

january twenty-two, 2020
androidx.camera:camera-lifecycle:1.0.0-alpha03 be exhaust. adaptation 1.0.0-alpha03 check these commit .
Updates

  • Various fixes and updates to support Camera Core & Camera2 changes.

Camera-Lifecycle Version 1.0.0-alpha02

december eighteen, 2019
androidx.camera:camera-lifecycle:1.0.0-alpha02 equal unblock. translation 1.0.0-alpha02 contain these commit .
Dependency changes

  • Updated to use androidx.camera:camera-core:1.0.0-alpha08.

Camera-Lifecycle Version 1.0.0-alpha01

december four, 2019
androidx.camera:camera-lifecycle:1.0.0-alpha01 equal let go of. adaptation 1.0.0-alpha01 of camera-lifecycle incorporate these entrust
API notes

  • The camera-lifecycle artifact is added, providing LifeCycleCameraProvider interface, and an implementation called ProcessCameraProvider which provides many of the functions of the previous CameraX class in core and is obtained via a getInstance() method.
  • Apps should include the camera-lifecycle library to use CameraX.
  • See notes in the camera-core section for how to perform initialization of CameraX using a ProcessCameraProvider.

Camera-Extensions and Camera-View Version 1.0.0

Version 1.0.0-alpha32

december fifteen, 2021
androidx.camera:camera-extensions:1.0.0-alpha32 and androidx.camera:camera-view:1.0.0-alpha32 constitute free. version 1.0.0-alpha32 check these perpetrate .
API Changes

  • Removed unnecessary @RequiresApi(21) annotations from the inner classes/interfaces. (I8e286, b/204917951)
  • Update api files for camera-extensions artifact. (If683a, b/161377155)

Bug Fixes

  • Disallow the app to enable extension modes when binding VideoCapture. CameraX Extensions only support ImageCapture and Preview. The VideoCapture can’t be supported yet. If the app binds VideoCapture and enables any extension mode, an IllegalArgumentException will be thrown. (I0d87b)
  • CameraSelector#filter no longer throws an IllegalArgumentException when the result set is empty. (I27804)
  • Renamed ExtensionsManager#getInstance API as getInstanceAsync because it returns ListenableFuture. The Async suffix of the function name can clearly present that it is an async function. (I279d2)
  • Remove resolution parameter from the ExtensionsManager#getEstimatedCaptureLatencyRange API since users can’t know which sizes are supported for the ImageCapture use case and can’t distinguish whether the returned latency information is for the maximum capture output size or the input resolution parameter. (I74bb2)
  • Move CameraProvider parameter of ExtensionsManager functions to the getInstance() API. So that the users don’t need to input the CameraProvider parameter each time when calling the ExtensionsManager functions. (Ic7e48)

Version 1.0.0-alpha31

november seventeen, 2021
androidx.camera:camera-extensions:1.0.0-alpha31 and androidx.camera:camera-view:1.0.0-alpha31 be secrete. version 1.0.0-alpha31 check these commit .
API Changes

  • Added CameraSelector#filter to the public API to filter a list of CameraInfos based on a CameraSelector. (I105d0)

Bug Fixes

  • Fixed a crash when switching extensions mode quickly on certain devices.
    (Iebbef)

Version 1.0.0-alpha30

october thirteen, 2021
androidx.camera:camera-extensions:1.0.0-alpha30 and androidx.camera:camera-view:1.0.0-alpha30 be free. version 1.0.0-alpha30 contain these commit .
API Changes

  • Added @RequiresApi(21) annotation to all CameraX classes
    and dropped minSdkVersion from AndroidManifest.xml. This will allow
    camera-core to be easily integrated into applications that have a
    minSdkVersion less than 21, but want to conditionally use code paths
    that rely on API 21 and higher. For any application with
    minSdkVersion 21 or higher, this change requires no action. (Ie7f2e, b/200599470)

Bug Fixes

  • Fixed the AbstractMethodError issue which happens when proguard is enabled. (Iae468, b/201177844)

Version 1.0.0-alpha29

september twenty-nine, 2021
androidx.camera:camera-extensions:1.0.0-alpha29 and androidx.camera:camera-view:1.0.0-alpha29 equal free. adaptation 1.0.0-alpha29 control these perpetrate .
API Changes

  • ExperimentalUseCaseGroup annotation is removed now that the APIs are no longer experimental. (I01ef5)
  • remove RotationProvider#removeAllListeners(). Please use RotationProvider#removeListener(...) instead. (Id9d4a)
  • Updated the RotationReceiver class: changed set/clear Listener to add/remove/removeAll, remove the setListener variation that uses the main thread by default and added annotation of methods. (Ib1669)

Bug Fixes

  • Renamed ExtensionMode#BEAUTY to FACE_RETOUCH to correctly present what is done by the extension mode. (I61f54, b/198515274)
  • Fixed the issue that camera is closed unexpectedly when multiple CameraController and PreviewView are used in one Activity. (Ibfd18, b/197539358)

Version 1.0.0-alpha28

august eighteen, 2021
androidx.camera:camera-extensions:1.0.0-alpha28 and androidx.camera:camera-view:1.0.0-alpha28 be release. version 1.0.0-alpha28 control these invest .
API Changes

  • ExperimentalUseCaseGroupLifecycle annotation is removed now that the APIs are no longer experimental. (I17b85)
  • refactored RotationListener and renamed it to RotationProvider. It continues to provide the same feature with slightly different API. (Idffc5)
  • rename TAP_TO_FOCUS_UNSUCCESSFUL to TAP_TO_FOCUS_NOT_FOCUSED and TAP_TO_FOCUS_SUCCESSFUL to TAP_TO_FOCUS_FOCUSED. Made OutputSize final (I099fa)

Bug Fixes

  • Removed deprecated Extender classes, ExtensionsErrorListener and related ExtensionsManager APIs. (I3b8c3)

Version 1.0.0-alpha27

july twenty-one, 2021
androidx.camera:camera-extensions:1.0.0-alpha27 and androidx.camera:camera-view:1.0.0-alpha27 cost turn. translation 1.0.0-alpha27 contain these give .
API Changes

  • Promoted the viewport API out of experimental. Remove the experimental annotation of the API. (I717ea)
  • Renamed CoordinateTransform#getTransform to CoordinateTransform#transform and update JavaDoc (I864ae)

Bug Fixes

  • Fixed PreviewView PERFORMANCE mode stretch issue when using it together with Compose UI. (Ie1137, b/183864890)

Version 1.0.0-alpha26

june thirty, 2021
androidx.camera:camera-extensions:1.0.0-alpha26 and androidx.camera:camera-view:1.0.0-alpha26 constitute free. interpretation 1.0.0-alpha26 check these commit .
API Changes

  • add a new method CameraController#getTapToFocusState() that exposes the latest tap-to-focus result. (Iaccb0)
  • adding more camera-core features to CameraController: getters/setters for target aspect ratio, target resolution, capture mode, CameraControl and custom executors. (Iea8f2)
  • add a RotationReceiver class that receives Surface rotation changes. This can be used to set the target rotation when the device is in fixed portrait/landscape mode. (Ib278f)
  • Exposed new getEstimatedCaptureLatencyRange public APIs in ExtensionsManager class. (I6a8ec)
  • Deprecated ExtensionsErrorListener. Currently, this interface is only used to monitor whether a Preview or ImageCapture is lacking when enabling extension modes. CameraX will automatically add an extra Preview or ImageCapture to make the extension functions work well. After that, no error will be reported via this interface. (I47d9e)
  • Exposed new ExtensionsManager getInstance, isExtensionAvailable and getExtensionEnabledCameraSelector public APIs and deprecated old Extender classes and related APIs. (I329e6)

Version 1.0.0-alpha25

june two, 2021
androidx.camera:camera-extensions:1.0.0-alpha25 and androidx.camera:camera-view:1.0.0-alpha25 be turn. version 1.0.0-alpha25 incorporate these commit .
API Changes

  • ExperimentalCameraFilter APIs are now out of experimental
    stage and become formal APIs. They can be used without annotated OptIn. (I4bc94)
  • Add a utility that transforms coordinates between use cases. Example usage: transforming the coordinates detected in ImageAnalysis use case and highlight the detected object in preview. (I63ab1, b/137515129)
  • Removed CameraView. CameraView has been replaced by CameraController. Please see the migration guide for how to migrate.: (Id5005)

Bug Fixes

  • Replaced ExperimentalUseCaseGroupLifecycle with
    ExperimentalUseCaseGroup. (I3b2ef, b/159033688)

Version 1.0.0-alpha24

april twenty-one, 2021
androidx.camera:camera-extensions:1.0.0-alpha24 and androidx.camera:camera-view:1.0.0-alpha24 be release. adaptation 1.0.0-alpha24 hold these commit .
Bug Fixes

  • Replaced annotation @Experimental with @RequiresOptIn to experimental APIs. For calling experimental APIs, use androidx.annotation.OptIn instead of deprecated androidx.annotation.experimental.UseExperimental. (Iff226)
  • Fixed the PreviewView stretched issue on Samsung J5 Prime (Ib10b6)

Camera Extensions & View Version 1.0.0-alpha23

march twenty-four, 2021
androidx.camera:camera-extensions:1.0.0-alpha23 and androidx.camera:camera-view:1.0.0-alpha23 are unblock. adaptation 1.0.0-alpha23 contain these entrust .
API Changes

  • CameraView is being deprecated. Please use LifecycleCameraController instead. See the migration guide (Idac2c)
  • Added FloatRange annotation to setLinearZoom() (I69971)

Bug Fixes

  • Pinned camera-view dependencies to rely on 1.0.0 artifacts.
    Depending on camera-view will not longer cause gradle’s dependency
    resolution to automatically upgrade camera-core, camera-camera2 and
    camera-lifecycle to the latest 1.1.0 artifacts, though camera-view is
    still compatible with those artifacts if they are explicitly set to use
    1.1.0. (Ic8fa1, b/181599852)
  • Fixed Samsung A3 stretched preview in PreviewView. (Iacb30, b/180121821)
  • Fixed the issue where if camera selector cannot be set before camera is initialized. (Ic8bd0)

Camera Extensions & View Version 1.0.0-alpha22

february twenty-four, 2021
androidx.camera:camera-extensions:1.0.0-alpha22 and androidx.camera:camera-view:1.0.0-alpha22 be free. translation 1.0.0-alpha22 contain these perpetrate .
API Changes

  • add a CameraInfo getter to CameraController. (Ib8138, b/178251727)

Bug Fixes

  • Fixed ExtensionsErrorListener to report errors when only Preview or ImageCapture is bound. (I5ae39)

Camera Extensions & View Version 1.0.0-alpha21

january twenty-seven, 2021
androidx.camera:camera-extensions:1.0.0-alpha21 and androidx.camera:camera-view:1.0.0-alpha21 cost free. version 1.0.0-alpha21 contain these give .
release to back early television camera library artifact .

Camera Extensions & View Version 1.0.0-alpha20

december sixteen, 2020
androidx.camera:camera-extensions:1.0.0-alpha20 and androidx.camera:camera-view:1.0.0-alpha20 constitute release. translation 1.0.0-alpha20 contain these entrust .
publish to support early camera library artifact .

Camera-Extensions & Camera-View Version 1.0.0-alpha19

november eleven, 2020
androidx.camera:camera-extensions:1.0.0-alpha19 and androidx.camera:camera-view:1.0.0-alpha19 be unblock. version 1.0.0-alpha19 contain these perpetrate .
Bug Fixes

  • @ExperimentalVideo annotation was introduced to camera-view.
    This annotation marks APIs which expose experimental video functionality
    which is subject to change as the features are fully developed. Any
    method using these APIs should use the @UseExperimental annotation
    with ExperimentalVideo as the markerClass. (I6d729)

Camera-Extensions Version 1.0.0-alpha18

october fourteen, 2020
androidx.camera:camera-extensions:1.0.0-alpha18 be publish. adaptation 1.0.0-alpha18 contain these give .
Bug Fixes

  • Improved the latency of CameraX initialization and
    bindToLifecycle (I61dc5)
  • .getTargetRotation() will return Surface.ROTATION_0
    if called before being attached to a Camera instance unless a
    targetRotation has been set on the Builder or UseCase. (I80fcd)

Camera-View Version 1.0.0-alpha18

october fourteen, 2020
androidx.camera:camera-view:1.0.0-alpha18 be turn. version 1.0.0-alpha18 contain these entrust .
exhaust to support early camera library artifact .

Camera-Extensions Version 1.0.0-alpha17

september twenty-three, 2020
androidx.camera:camera-extensions:1.0.0-alpha17 be let go of. interpretation 1.0.0-alpha17 control these give .
Bug Fixes

  • Release to support Camera-Core 1.0.0-beta10

Camera-View Version 1.0.0-alpha17

september twenty-three, 2020
androidx.camera:camera-view:1.0.0-alpha17 be exhaust. adaptation 1.0.0-alpha17 check these invest .
Bug Fixes

  • Release to support Camera-Core 1.0.0-beta10

Camera-Extensions Version 1.0.0-alpha16

september sixteen, 2020
androidx.camera:camera-extensions:1.0.0-alpha16 embody release. adaptation 1.0.0-alpha16 hold these give .
Bug Fixes

  • Added method in ExtensionsManager to get an Extensions object
    which is used to enable and query extensions on Camera instances (I4fb7e)

Camera-View Version 1.0.0-alpha16

september sixteen, 2020
androidx.camera:camera-view:1.0.0-alpha16 be release. version 1.0.0-alpha16 contain these give .
API Changes

  • Removed PreviewView#setDeviceRotationForRemoteDisplayMode() and PreviewView#getDeviceRotationForRemoteDisplayMode(). The two methods are for customizing preview rotation, when desired rotation is not display rotation, e.g. remote display. To handle the non-display preview rotation now, set the desired rotation with Preview#setTargetRotation() and the newly added PreviewView#getViewPort(targetRotation). (Ib62cc)
  • Renamed createSurfaceProvider() to getSurfaceProvider(). The method will always return the same instance of Preview.SurfaceProvider. (Iff83c)

Bug Fixes

  • Forced PreviewView to use TextureView if extension effect is enabled and the vendor library implementation needs to do a special process on the output surface. (I0c3cc)
  • Allow arbitrary target rotation for Preview. The transformation info is calculated and returned to user on-the-fly via a new TranformationInfoListener callback. (I21470)

Known Issues

  • In PreviewView, OnClickListener#onClick() is not invoked when the end user clicks PreviewView. The touch event is mistakenly consumed by PreviewView#onTouchEvent(). The issue will be fixed in the next release.
  • The MeteringPoint obtained from PreviewView#getMeteringPointFactory() may be wrong if ViewPort is used with PreviewView.

Camera-Extensions Version 1.0.0-alpha15

august nineteen, 2020
androidx.camera:camera-extensions:1.0.0-alpha15 be free. version 1.0.0-alpha15 incorporate these perpetrate .
Bug Fixes

  • The ExtensionsManager.init() method now takes in a
    Context as a parameter instead of having 0 args. (Ife754)
  • low-level formatting should no long crash when use ampere context that doe not return associate in nursing application object from Context.getApplicationContext(). ( I3d3c9, b/160817073 )

    Camera-View Version 1.0.0-alpha15

    august nineteen, 2020

androidx.camera:camera-view:1.0.0-alpha15 be exhaust. version 1.0.0-alpha15 control these commit .
Bug Fixes

  • DisplayOrientedMeteringPointFactory takes in a CameraInfo
    instance instead of a CameraSelector so there is a direct mapping to
    which Camera the factory will be generating points for. All classes
    which use DisplayOrientedMeteringPointFactory also take in a CameraInfo
    instance instead of CameraSelector. (I400c1)
  • Removed TextureViewMeteringPointFactory. PreviewView provides a public API (createMeteringPointFactory()) to create a metering point factory regardless of whether it’s using a TextureView or SurfaceView. (Ide693)
  • rename PreviewView’s SURFACE_VIEW/TEXTURE_VIEW implementation modes to PERFORMANCE/COMPATIBLE. PERFORMANCE is the old SURFACE_VIEW mode, and COMPATIBLE is the old TEXTURE_VIEW mode. (I0edc2)
  • For image capture, overwrite the flip horizontal flag in metadata based on camera direction. (I28499)

Camera-Extensions Version 1.0.0-alpha14

july twenty-two, 2020
androidx.camera:camera-extensions:1.0.0-alpha14 be release. version 1.0.0-alpha14 hold these invest .

Camera-View Version 1.0.0-alpha14

july twenty-two, 2020
androidx.camera:camera-view:1.0.0-alpha14 be release. adaptation 1.0.0-alpha14 control these invest .

Camera-Extensions Version 1.0.0-alpha13

june twenty-four, 2020
androidx.camera:camera-extensions:1.0.0-alpha13 equal turn. version 1.0.0-alpha13 check these invest .
Bug Fixes

  • Added experimental interfaces for filtering cameras by camera
    ID and CameraCharacteristics. (I28f61)

Camera-View Version 1.0.0-alpha13

june twenty-four, 2020
androidx.camera:camera-view:1.0.0-alpha13 be release. translation 1.0.0-alpha13 check these perpetrate .
Bug Fixes

  • CameraView no longer crashes with an IllegalArgumentException
    when binding to a LifecycleOwner whose Lifecycle transitions to a DESTROYED
    state shortly after being bound. Binding Lifecycles in a DESTROYED state
    will not attempt to open the camera. (I7c2b8)
  • PreviewView StreamState is now available through
    CameraView.getPreviewStreamState() (I21a2b)

Camera-Extensions Version 1.0.0-alpha12

june ten, 2020
androidx.camera:camera-extensions:1.0.0-alpha12 exist free. translation 1.0.0-alpha12 control these commit .
Bug Fixes

  • Fix the crash on app startup when initialising CameraX while phone is in Do Not Disturb mode. An InitializationException contains a CameraUnavailableException will be set to the ListenableFuture of the intialization result instead of crashing the application. (I9909a, b/149413835)

Camera-View Version 1.0.0-alpha12

june ten, 2020
androidx.camera:camera-view:1.0.0-alpha12 be secrete. version 1.0.0-alpha12 contain these commit .
Bug Fixes

  • Add PreviewView#getBitmap() API which returns a Bitmap representation of the content displayed on the preview surface. (I9b500, b/157659818)

Camera-Extensions Version 1.0.0-alpha11

may twenty-seven, 2020
androidx.camera:camera-extensions:1.0.0-alpha11 exist release. version 1.0.0-alpha11 control these commit .

Camera-View Version 1.0.0-alpha12

june ten, 2020
androidx.camera:camera-view:1.0.0-alpha12 equal free. version 1.0.0-alpha12 check these commit .
New Features
API Changes
Bug Fixes

  • Add PreviewView#getBitmap() API which returns a Bitmap representation of the content displayed on the preview surface. (I9b500, b/157659818)

Camera-View Version 1.0.0-alpha11

may twenty-seven, 2020
androidx.camera:camera-view:1.0.0-alpha11 be free. interpretation 1.0.0-alpha11 incorporate these entrust .
API Changes

  • Add PreviewView#getPreviewStreamState API which
    allows apps to observe if preview is streaming or not. When
    the PreviewView is in TEXTURE_VIEW mode, the STREAMING state
    also guarantees the preview image is visible. (Ic0906, b/154652477)
  • Added PreviewView#setDeviceRotationForRemoteDisplayMode() API to provide device rotation for transform calculations if the application is running in remote display mode. (I59b95, b/153514525)

Bug Fixes

  • Fixed the preview distortion issue on FULL/LIMITED/LEVEL_3 cameras running android 7.0 and below. Forced use ImplementationMode#TEXTURE_VIEW mode when the android version is 7.0 or below. (I83e30, b/155085307)
  • Removed the CameraInfo parameter from PreviewView#createSurfaceProvider(), PreviewView now internally retrieves it from the SurfaceRequest. (If18f0, b/154652477)
  • Fixed the VideoCapture’s default aspect ratio to be 16:9 in CameraView. (Ie6a7b, b/153237864)
  • Fix PreviewView black screen issues when swiped out Preview fragment and then swiped back in ViewPager2. Also fixed the issue when removeView(previewview) and then addView(previewView). (Iab555, b/149877652, b/147354615)
  • Update the CameraView#takePicture() API to allow saving images to Uri and OutputStream. Update the test app to use Uri as the canonical example. (Ia2459, b/153607583)
  • You can set PreviewView’s scale type from a XML layout by setting the ScaleType attribute. (I08565, b/153015659)
  • CameraView.ScaleType has been removed. Instead, use PreviewView.ScaleType to set/get a scale type with CameraView. (Ia8974, b/153014831)
  • Give PreviewView a background color by default if it doesn’t already have one. This prevents content behind it from being visible before the preview stream starts. (I09fad)

Camera-Extensions Version 1.0.0-alpha10

april fifteen, 2020
androidx.camera:camera-extensions:1.0.0-alpha10 be turn. version 1.0.0-alpha10 check these give .
Bug Fixes

  • Fixes to support the release of Camera-Core

Camera-View Version 1.0.0-alpha10

april fifteen, 2020
androidx.camera:camera-view:1.0.0-alpha010 equal publish. version 1.0.0-alpha010 incorporate these invest .
Bug Fixes

  • Fixes a previous known issue where PreviewView‘s surfaceView implementation wasn’t working well on certain devices, and would cause the app to crash after resuming preview. (I5ed6b)

Camera-Extensions Version 1.0.0-alpha09

april one, 2020
androidx.camera:camera-extensions:1.0.0-alpha09 equal free. version 1.0.0-alpha09 incorporate these commit .
Bug Fixes

  • Updated to support the bug fixes in the camera-camera2:1.0.0-beta02, camera-core:1.0.0-beta02, and camera-lifecycle:1.0.0-beta02 artifacts

Camera-View Version 1.0.0-alpha09

april one, 2020 androidx.camera:camera-view:1.0.0-alpha09 cost let go of. version 1.0.0-alpha09 contain these perpetrate .
Known Issues

  • Using ImplementationMode.SURFACE_VIEW with PreviewView may not work well on certain devices, this is because the SurfaceView used for preview invalidates its surface when the lifecycle of the window it’s in is stopped, when it restarts, the camera is reopened and may attempt to resume preview before the SurfaceView‘s surface is valid again. For now, you should use ImplementationMode.TEXTURE_VIEW.

API Changes

  • Renamed PreviewView.setImplementationMode() to PreviewView.setPreferredImplementationMode().
  • Renamed PreviewView.getImplementationMode() to PreviewView.getPreferredImplementationMode().
  • Replaced PreviewView.getSurfaceProvider() by PreviewView.createSurfaceProvider(CameraInfo), which takes a nullable CameraInfo instance used to optimize preview by using ImplementationMode.SURFACE_VIEW whenever possible. If a null instance is passed, or if you set the preferred implementation mode to ImplementationMode.TEXTURE_VIEW, ImplementationMode.TEXTURE_VIEW is used internally.
  • The following code sample distribution show how a preview use subject use to previously constitute use with PreviewView .
    preview.setSurfaceProvider(previewView.previewSurfaceProvider)
    cameraProvider.bindToLifecycle(lifecycleOwner, cameraSelector, preview)
    

    right now, you can write the follow :

    val camera = cameraProvider.bindToLifecycle(lifecycleOwner, cameraSelector, preview)
    previewView.preferredImplementationMode = ImplementationMode.TEXTURE_VIEW
    preview.setSurfaceProvider(previewView.createSurfaceProvider(camera.cameraInfo))
    
  • The @UiThread note hour angle equal add to PreviewView.getSurfaceProvider(), mean information technology must be call from the independent ribbon. ( I192f3 )
  • add PreviewView.setScaleType() which permit to dress the scale type of the preview. information technology take one of the value in PreviewView.ScaleType, and default to PreviewView.ScaleType.FILL_CENTER .
  • add PreviewView.getScaleType() .
  • remove support for set the execution mode for PreviewView indiana vitamin a XML layout use the implementationMode attribute .
  • add createMeteringPointFactory() API to PreviewView to support convert ( ten, y ) in PreviewView to MeteringPoint. ( Ib36d7 )

Bug Fixes

  • Fixed cases where an incorrect preview is displayed after PreviewView‘s size changes. (I71101)

Camera-Extensions Version 1.0.0-alpha08

february twenty-six, 2020
androidx.camera:camera-extensions:1.0.0-alpha08 be exhaust. version 1.0.0-alpha08 control these commit .

Camera-View Version 1.0.0-alpha08

february twenty-six, 2020
androidx.camera:camera-view:1.0.0-alpha08 be turn. interpretation 1.0.0-alpha08 contain these commit .
Bug Fixes

  • Replaced the ListenableFuture on
    SurfaceRequest.provideSurface() with an Executor and Callback. This
    simplifies the API by no longer requiring handling of exceptions on
    provideSurface() and enforces that the provideSurface() callback cannot
    be cancelled. This is to prevent crashes on older devices caused by
    prematurely releasing surfaces. The SurfaceRequest.Result object is now used
    for tracking how a SurfaceRequest uses the provided Surface. (I7854b)
  • Renamed SurfaceRequest.setSurface(Surface) to
    SurfaceRequest.provideSurface(Surface) and
    SurfaceRequest.setWillNotComplete() to
    SurfaceRequest.willNotProvideSurface(). (I224fe)
  • Fixed initialization of app variants with ProGuard enabled by preserving the
    flag that sets the default CameraXConfig provider. (I2d6c1)

Camera-Extensions Version 1.0.0-alpha07

february ten, 2020
androidx.camera:camera-extensions:1.0.0-alpha07 be release. translation 1.0.0-alpha07 check these invest .
Bug Fixes

  • The arguments that were previously passed in ImageCapture.OnImageSavedCallback.onError() and ImageCapture.OnImageCapturedCallback.onError() have now been replaced by a single argument ImageCaptureException, which still contains all the information that was previously passed.
  • The file argument previously passed in ImageCapture.OnImageSavedCallback.onImageSaved() has been removed. (I750d2)

Camera-View Version 1.0.0-alpha07

february ten, 2020
androidx.camera:camera-view:1.0.0-alpha07 be unblock. adaptation 1.0.0-alpha07 hold these entrust .
API Changes

  • PreviewView‘s TextureView implementation now sets the TextureView‘s size to the camera sensor output size before scaling it to fill its parent PreviewView. If you want the camera preview to fill an entire part of the UI (the whole screen for instance), you should not set the PreviewView‘s size to a fixed value, or have it wrap its content (by using the attribute “wrap_content” for example), this may result in the camera preview only filling part of the PreviewView (if the camera sensor output size is smaller). Instead, you should set the PreviewView as big as its parent (by using the attribute “match_parent” for example). (1204869)

Bug Fixes

  • Updated ImageCapture to allow saving images to Uri and OutputStream. Combined overloaded takePicture methods into one. Updated test app to use Uri as the canonical example. (Ia3bec)
  • Preview.PreviewSurfaceProvider has been renamed to Preview.SurfaceProvider. SurfaceProviders no longer require developers to create their own ListenableFuture, and providing a Surface is now done through a new SurfaceRequest object. The Preview.getPreviewSurfaceProvider() method has been removed due to its potential for misuse when Preview is paired with other classes such as PreviewView. (I20105)
  • The arguments that were previously passed in ImageCapture.OnImageSavedCallback.onError() and ImageCapture.OnImageCapturedCallback.onError() have now been replaced by a single argument ImageCaptureException, which still contains all the information that was previously passed.
  • The file argument previously passed in ImageCapture.OnImageSavedCallback.onImageSaved() has been removed. (I750d2)
  • API updated, with getZoomRatio(), getMaxZoomRatio(), getMinZoomRatio(), and getLinearZoom() methods of CameraInfo merging into getZoomState() which returns a ZoomState instance. (Ib19fe)

Camera-Extensions Version 1.0.0-alpha06

january twenty-two, 2020
androidx.camera:camera-extensions:1.0.0-alpha06 embody secrete. version 1.0.0-alpha06 check these commit .
Updates

  • Various fixes and updates to support Camera Core & Camera2 changes.

Camera-View Version 1.0.0-alpha06

january twenty-two, 2020
androidx.camera:camera-view:1.0.0-alpha06 equal secrete. version 1.0.0-alpha06 check these commit .
Updates

  • Various fixes and updates to support Camera Core & Camera2 changes.

Camera-Extensions Version 1.0.0-alpha05

december eighteen, 2019
androidx.camera:camera-extensions:1.0.0-alpha05 be let go of. translation 1.0.0-alpha05 contain these commit .
Bug Fixes

  • Updated to match the internal Camera Core APIs.

Camera-View Version 1.0.0-alpha05

december eighteen, 2019
androidx.camera:camera-view:1.0.0-alpha05 be release. interpretation 1.0.0-alpha05 contain these give .
Known Issues

  • The aspect ratio may be incorrect when using PreviewView (b/146215202).

New Features

  • Implemented a new class called PreviewView.TextureViewImplementation that syncs the SurfaceTexture’s lifecycle with the camera’s usage of the TextureView’s surface.

Camera-Extensions Version 1.0.0-alpha04

december four, 2019
androidx.camera:camera-extensions:1.0.0-alpha04 exist unblock. translation 1.0.0-alpha04 of camera-extensions hold these perpetrate
API changes

  • check for the handiness and enabling of associate in nursing extension now take indiana vitamin a CameraSelector arsenic associate in nursing input parameter. This necessitate to be the same CameraSelector that be use for bind the use case .
    val cameraSelector = CameraSelector.DEFAULT_BACK_CAMERA
    val builder = ImageCapture.Builder()
    val bokehImageCaptureExtender = BokehImageCaptureExtender.create(builder)
    if (bokehImageCaptureExtender.isExtensionAvailable(cameraSelector)) {
        bokehImageCaptureExtender.enableExtension(cameraSelector)
    }
    val imageCapture = builder.build()
    mCameraProvider?.bindToLifecycle(this, cameraSelector, imageCapture)
    
  • You must initialize propagation earlier use the extension library .
    val availability = ExtensionsManager.init()
    Futures.addCallback(
       availability,
       object : FutureCallback {
           override fun onSuccess(availability: ExtensionsManager.ExtensionsAvailability?) {
               // Ready to make extensions calls
           }
           override fun onFailure(throwable: Throwable) {
               // Extensions could not be initialized
           }
       },
       Executors.newSingleThreadExecutor()
    )
    

Camera-View Version 1.0.0-alpha04

december four, 2019
androidx.camera:camera-view:1.0.0-alpha04 be free. translation 1.0.0-alpha04 of camera-view contain these commit
API changes

  • A PreviewView class is provided for easily displaying the output from the Preview use case in an application.
  • PreviewView toilet embody admit inch the layout :
    
    
  • PreviewView provide vitamin a PreviewSurfaceProvider to easily connect adenine preview manipulation subject
    preview.setPreviewSurfaceProvider(previewView.previewSurfaceProvider)
    
  • ZoomLevel ” constitute now “ ZoomRatio ” in API-naming
  • some method acting parameter take transfer nullability

Camera-Extensions and Camera-View Version 1.0.0-alpha03

october nine, 2019
androidx.camera:camera-extensions:1.0.0-alpha03 and androidx.camera:camera-view:1.0.0-alpha03 equal turn. These exist the perpetrate included in camera-extensions:1.0.0-alpha03 and these be the commit include indiana camera-view:1.0.0-alpha03 .
New Features

  • Added Context initializer for extensions. Extensions version incremented to 1.1.0

Camera-Extensions and Camera-View Version 1.0.0-alpha02

september five, 2019

androidx.camera:camera-extensions:1.0.0-alpha02 and androidx.camera:camera-view:1.0.0-alpha02 be turn. These be the commit include inch camera-extensions:1.0.0-alpha02 and these equal the give included camera-view:1.0.0-alpha02 .

  • Added tests to verify PreviewImageProcessorImpl has correctly implemented
    timestamps.
  • Fix ExtensionTest test failure on Nexus 5 (API level 21) and ensure preview
    is available.

Camera-Extensions and Camera-View Version 1.0.0-alpha01

androidx.camera:camera-extensions:1.0.0-alpha01 and androidx.camera:camera-view:1.0.0-alpha01 be release. These be the commit admit in camera-extensions:1.0.0-alpha01 and these be the entrust admit camera-view:1.0.0-alpha01

  • New library for future Camera Extensions for accessing effects on supported devices. This library is a work in progress.
  • New Camera View class. This library is a work in progress.
Alternate Text Gọi ngay
Liên kết hữu ích: XSMB