Camera2 is the latest Android camera framework API that replaces the deprecated camera framework libraries. Camera2 provides in-depth controls for complex use cases but requires you to manage device-specific configurations. You can read about the specific classes and functions in Camera2 in the corresponding reference documentation.

For most developers, we recommend you use the CameraX Jetpack library for a consistent and easy-to-use API surface that works across all Android devices starting from Android 5.0 (API level 21).