Skip to content

AyushKCatgithub/CameraX

Repository files navigation

📸 CameraX — Modern Android Camera App

A sleek, modern camera application built with Jetpack Compose and CameraX, featuring photo capture, video recording, and automatic gallery saving — all wrapped in a premium dark-themed UI.


✨ Features

  • 📷 Photo Capture — Tap to capture high-quality photos with shutter sound feedback
  • 🎥 Video Recording — Record videos with audio, pulsing REC indicator, and tone feedback
  • 💾 Auto Gallery Save — Photos & videos saved directly to DCIM/CameraX via MediaStore
  • 🔄 Camera Flip — Switch between front and back cameras with smooth rotation animation
  • 🖼️ Photo Gallery — Browse captured photos in an elegant bottom sheet with staggered grid
  • 🌙 Dark Theme — Immersive camera-first dark UI with transparent system bars
  • 🎨 Modern Design — Frosted-glass controls, circular buttons, micro-animations throughout

🏗️ Tech Stack

Layer Technology
UI Jetpack Compose + Material 3
Camera CameraX (Camera2 backend)
Architecture MVVM with ViewModel
Media Storage MediaStore API (scoped storage)
Audio Feedback MediaActionSound + ToneGenerator
Language Kotlin
Min SDK 29 (Android 10)
Target SDK 36

📁 Project Structure

com.heptdi.camerax/
├── MainActivity.kt              # Main activity — camera logic, UI, gallery saving
├── presentation/
│   ├── CameraPreview.kt         # Camera feed composable (PreviewView)
│   ├── MainViewModel.kt         # ViewModel holding captured bitmaps
│   └── PhotoBottomSheetContent.kt # Gallery grid in bottom sheet
└── ui/theme/
    ├── Color.kt                 # Dark camera color palette
    ├── Theme.kt                 # Forced dark theme + transparent bars
    └── Type.kt                  # Typography definitions

🚀 Getting Started

Prerequisites

  • Android Studio Ladybug or newer
  • JDK 11+
  • Physical Android device (camera required)

Build & Run

# Clone the repository
git clone https://github.com/AyushKCatgithub/CameraX.git
cd CameraX

# Build the debug APK
./gradlew assembleDebug

# Install on connected device
./gradlew installDebug

Permissions

The app requests at runtime:

  • CAMERA — Required for photo/video capture
  • RECORD_AUDIO — Required for video recording with audio

No storage permissions needed — uses MediaStore API (Android 10+).

🎨 UI Highlights

  • Floating control bar — Rounded pill-shaped bottom bar with frosted glass effect, clear of navigation buttons
  • Capture button — Large white-ring circle with inner fill
  • Record button — Animated border color transition (white → red), stop icon when recording
  • REC indicator — Pulsing red dot + text overlay during video recording
  • Camera flip — 180° rotation animation on the switch icon

📦 Key Dependencies

// CameraX
androidx.camera:camera-core
androidx.camera:camera-camera2
androidx.camera:camera-lifecycle
androidx.camera:camera-video
androidx.camera:camera-view
androidx.camera:camera-extensions

// Compose
androidx.compose:compose-bom
androidx.compose.material3:material3
androidx.compose.material:material-icons-extended

// Architecture
androidx.lifecycle:lifecycle-viewmodel-compose

📄 License

This project is open source and available under the MIT License.


Made with ❤️ by AyushKCatgithub

About

A modern Android camera app built with Jetpack Compose and CameraX. Capture photos and record videos with a sleek dark-themed UI, smooth animations, and automatic gallery saving — no storage permissions needed.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages