What problem does it solve? Legacy Android camera code built on Camera1 or raw Camera2 APIs is verbose, error-prone, and riddled with device-specific rotation and lifecycle bugs. This Skill provides a step-by-step playbook to migrate that code to CameraX, the lifecycle-aware Jetpack library that handles rotation, focus metering, and device compatibility automatically. ## Core Features & Use Cases - Dependency Setup: Adds the correct CameraX artifacts (core, camera2, lifecycle, view, compose) via Version Catalog or plain Gradle coordinates. - Lifecycle-Aware Migration: Replaces manual camera open/close logic with ProcessCameraProvider binding to a LifecycleOwner. - Dual UI Toolkit Support: Provides separate implementation paths for Android Views (PreviewView) and Jetpack Compose (CameraXViewfinder), including tap-to-focus and photo capture with correct rotation handling. - Use Case: An app with a legacy SurfaceView-based camera screen that breaks on rotation can be migrated step by step: remove Camera1 code, bind Preview and ImageCapture use cases, and capture correctly rotated photos with a few dozen lines of Kotlin. ## Quick Start Migrate my Android app's legacy Camera1 camera screen to CameraX with a Compose viewfinder and tap-to-focus support.