What problem does it solve?
It solves the brittleness of legacy Android camera implementations by guiding you to replace Camera1 and raw Camera2 code with CameraX, reducing rotation bugs and handling device differences more reliably.
Core Features & Use Cases
- Dependency setup for CameraX (including interoperability guidance): Ensures you add the correct CameraX artifacts for both Preview/ImageCapture and optional Compose integration.
- Modern lifecycle-safe initialization: Replaces manual camera open/close logic with
ProcessCameraProvider.bindToLifecycle tied to a LifecycleOwner.
- Preview + tap-to-focus migration: Shows how to implement a correct preview pipeline and trigger focus/metering using CameraX APIs for both Views and Jetpack Compose.
- Correct capture handling: Uses
ImageCapture so rotation is handled via ImageProxy and emphasizes closing the proxy to avoid capture deadlocks.
Quick Start
Ask an AI to migrate your existing Android Camera1/Camera2 implementation to CameraX by adding the recommended dependencies, binding use cases to a lifecycle owner, wiring Preview and ImageCapture, and implementing tap-to-focus for either Views or Jetpack Compose.