What is Android CameraX?

In Google IO 2019, Google added another powerful tool for camera development in Android development called CameraX as part of Jetpack

Few Features of CameraX

  • It is backwards compatible till Android 5.0 / Lollipop (API 21) and it works with at least 90% devices in the market.
  • Under the hood, it uses and leverages the Camera 2 APIs. It basically, provide the same consistency as Camera 1 API via Camera 2 Legacy layer and it fixed a lot of issues across the device.
  • It also has a lot of awesome advanced features like Portrait, HDR, Night mode etc (Provided your Device supports that).
  • CameraX has also introduced use cases which allow you to focus on the the task you need to get it done and not waste your time with specific devices. Few of them are Preview, Image Analysis, Image Capture.
  • CameraX doesn't have specific call/stop methods in onResume() and onPause() but it binds to the lifecycle of the View with the help of CameraX.bindToLifecycle()
  • The following is the few lists of known issues fixed with CameraX,

enter image description here

what more you can do with CameraX

  • You can also create Video Recorder App using CameraX
  • Add multiple extensions like Portrait Mode, HDR etc.
  • We can also use Image Analysis to perform Computer Vision, ML. So it implements Analyzer method to run on each and every frame.

To read more about CameraX refer here

for Getting Started with CameraX


What is Android CameraX?

CameraX is a new Jetpack library that lets developers control a device's camera and focuses on compatibility across devices going back to API level 21 (Lollipop). It was announced at Google I/O 2019 and has a dedicated documentation page alongside an official sample.

Does it mean that Camera2 API is deprecated?

Camera2 API is not deprecated; in fact, it is the foundation that CameraX is built on. CameraX also provides a Camera2 interop API that lets developers extend their CameraX implementation with Camera2 code.

For more information, the official documentation is available at https://developer.android.com/camerax