What problem does it solve?
It solves the pain of migrating legacy Android camera code (Camera1 and raw Camera2 usage) that suffers from lifecycle fragility, rotation bugs, and device-specific dependency headaches.
Core Features & Use Cases
- CameraX dependency setup: Add compatible CameraX libraries (including interoperability requirements for specific Compose extensions).
- Lifecycle-aware camera binding: Replace manual camera open/close and custom lifecycle code with ProcessCameraProvider and bind use cases to a LifecycleOwner.
- Preview, tap-to-focus, and capture: Implement Preview and ImageCapture with correct focus metering and safe ImageProxy handling.
Use it when modernizing an existing app that currently uses SurfaceView/SurfaceHolder callbacks, manual orientation matrices, and onResume/onPause camera management, but needs a CameraX-based implementation with Compose or Views.
Quick Start
Ask an AI to rewrite your current Camera1/Camera2 camera preview, focus, and photo-capture code into a CameraX implementation that binds to a LifecycleOwner, uses ProcessCameraProvider, supports tap-to-focus, and correctly closes ImageProxy.