Why CameraX

Why CameraX Over the Legacy Camera APIs

The original android.hardware.Camera was deprecated in Android 5.0 in favor of Camera2, which exposes the whole pipeline (capture sessions, request builders, per-frame metadata, manual control) and every vendor quirk in orientation, aspect ratio and resolution. CameraX 234 sits on top and hides those quirks behind use cases bound to a lifecycle. Since 1.6 it runs on CameraPipe, the stack behind the Pixel camera.

Camera2 versus CameraX
Camera2 CameraX
Level Low: sessions and capture requests High: use cases bound to a lifecycle
Device quirks Your problem Handled, tested on many devices
Manual control Full (ISO, exposure, RAW) Common controls; Camera2 interop
Compose 234 Via TextureView/SurfaceView CameraXViewfinder

Capacitor 243,123 's Camera plugin (Camera) and expo-camera (Camera and Barcodes) wrap these same APIs. Choose Camera2 only for a camera-first app; for photos in an ordinary app, CameraX is Google's recommendation.