CameraX is a Jetpack support library, built to help you make camera app development easier. It provides a consistent and easy-to-use API surface that works across most Android devices, with backward-compatibility to Android 5.0 (API level 21).
While it leverages the capabilities of camera2, it uses a simpler, use case-based approach that is lifecycle-aware. It also resolves device compatibility issues for you so that you don't have to include device-specific code in your code base. These features reduce the amount of code you need to write when adding camera capabilities to your app.
(https://developer.android.com/training/camerax)
The code is written in java.
CameraX Version used in this app is 1.0.0-beta03. The code may change in the coming new updates since it's still in beta release.
This code uses lambda expressions (Java 8).