A single, stand-alone Android app that showcases the Camera2 and CameraX APIs through a catalog of small, self-contained, Compose-first samples. Each sample focuses on one feature and reuses a shared camera-scaffolding layer, so adding a new sample means writing the feature — not the boilerplate.
The home catalog in the "Console" theme — a violet accent, monospace metadata, a bordered featured card, and a dense 2-column grid. The filter pills narrow the catalog by category, and samples are grouped CameraX-first, Camera2 below.
- Clone the repository.
- Open it in a recent Android Studio.
- Run the
appconfiguration on a device or emulator. Camera-dependent samples (extensions, slow-motion, ML) behave best on a physical device; emulators with a virtual camera cover the basics.
No Firebase / google-services.json is required.
Filter the catalog by category (Images / Video / ML / Graphics / Extensions / Controls) on the home screen. Within each view, CameraX samples are listed first and Camera2 below.
| Sample | API | What it shows |
|---|---|---|
| Take a Photo | CameraX / Camera2 | Preview, tap-to-focus, capture a still |
| Take a Video | CameraX (Recorder) / Camera2 (MediaRecorder) | Record video to DCIM/Camera |
| Pause/Resume | CameraX (Recorder) | Pause and resume a recording mid-capture |
| Slow Motion | Camera2 | High-speed (constrained) recording |
| HDR Video | CameraX / Camera2 | Record & play back 10-bit HDR video (DynamicRange / DynamicRangeProfiles) |
| Video Stabilization | CameraX | Steadier footage via preview + video stabilization |
| Flip While Recording | CameraX | Switch front/back cameras without interrupting the recording |
| QR Scanner | CameraX / Camera2 + ML Kit | Real-time barcode/QR detection with overlay |
| Image Labeling | CameraX + ML Kit | Real-time on-device labels via ImageAnalysis |
| Luminosity | CameraX | Scene-brightness meter from the ImageAnalysis Y plane |
| Green Screen | CameraX + ML Kit | Concurrent cameras: segment the front-camera subject over the live back camera |

