Introduction:

Developing with the camera on Android can be difficult. When we need to develop a camera-based application, we need to do a lot of manual work, and we need to do handle a lot of complex things with the Camera API, like handling preview screens, image rotations, and much more

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

Features of CameraX:

It’s backward compatible to Android 5.0 / Lollipop (API 21). Supports advanced features like Portrait, HDR, night mode, etc. 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()