{"id":20298231,"url":"https://github.com/samuel0122/android-camerax-mvvm","last_synced_at":"2026-05-13T02:04:27.424Z","repository":{"id":260924344,"uuid":"881928418","full_name":"samuel0122/Android-CameraX-MVVM","owner":"samuel0122","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-13T09:10:26.000Z","size":5278,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-13T12:08:15.705Z","etag":null,"topics":["android-app","camerax","camerax-api","kotlin-android"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samuel0122.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-01T14:11:37.000Z","updated_at":"2025-09-13T09:10:29.000Z","dependencies_parsed_at":"2024-12-12T21:23:22.692Z","dependency_job_id":"34c6307d-881a-47b9-9a62-a278df5d7579","html_url":"https://github.com/samuel0122/Android-CameraX-MVVM","commit_stats":null,"previous_names":["samuel0122/android-camerax-mvvm"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/samuel0122/Android-CameraX-MVVM","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuel0122%2FAndroid-CameraX-MVVM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuel0122%2FAndroid-CameraX-MVVM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuel0122%2FAndroid-CameraX-MVVM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuel0122%2FAndroid-CameraX-MVVM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samuel0122","download_url":"https://codeload.github.com/samuel0122/Android-CameraX-MVVM/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuel0122%2FAndroid-CameraX-MVVM/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32964445,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-12T23:30:32.555Z","status":"online","status_checked_at":"2026-05-13T02:00:07.132Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android-app","camerax","camerax-api","kotlin-android"],"created_at":"2024-11-14T16:07:35.284Z","updated_at":"2026-05-13T02:04:27.419Z","avatar_url":"https://github.com/samuel0122.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Android CameraX MVVM\n\n*Capture photos, record videos, and preview media with modern Android development practices.*\n\nThis project demonstrates how to implement **CameraX** in an Android application using the **MVVM** (Model-View-ViewModel) view pattern, combined with a **Clean Architecture** architectural pattern. The project includes features like capturing photos, recording videos, and previewing media with modern Android development practices.\n\n## 📋 Features\n\n- 📷 **Photo \u0026 Video Capture**: Take high-quality pictures and record videos using CameraX, with full support for exposure control, flash, and front/back camera switching.  \n- 👀 **Media Preview**: Preview captured photos and videos.\n- 🧱 **Clean Architecture**: Clean separation in layers: Domain, Data and View.\n- 🎯 **Jetpack Components**: Uses Navigation, DataStore, and more.\n- 💉 **Dependency Injection**: Powered by Dagger Hilt for modular and testable code.\n\n\n## 🛠️ Tech Stack\n\n- **Kotlin**: 100% Kotlin-based code.\n- **CameraX**: For camera functionality.\n- **Jetpack**:\n  - Navigation Component\n  - DataStore for managing preferences\n  - ViewModel and LiveData for reactive UI updates\n- **ExoPlayer**: For video playback.\n- **Dagger Hilt**: Dependency Injection.\n\n\n## 🚀 Getting Started\n\n### Prerequisites\n1. Android Studio (latest stable version recommended)\n2. Android SDK 21+\n\n\n### Setup\n1. [ ] Clone the repository:\n    ```bash\n    git clone https://github.com/samuel0122/Android-CameraX-MVVM.git\n    cd Android-CameraX-MVVM\n    ```\n2. [ ] Open the project in Android Studio.\n3. [ ] Sync Gradle to download dependencies.\n4. [ ] Run the app on a physical or virtual device.\n\n\n## 📂 Project Structure\n\n```\n📂 app/\n├── 📂 core/                # Utility classes and extensions\n├── 📂 data/                # Data layer (e.g., repositories, DataStore management)\n│   ├── 📂 mediaStorage     # Handles loading and saving media on disk\n│   ├── 📂 dataPreferences  # Manages preferences using DataStore (e.g. last media URI)\n│   ├── 🗒️ MediaRepository  # Repository to access media files (photos \u0026 videos)\n├── 📂 di/                  # Dependency injection modules\n├── 📂 domain/              # Domain layer (Use Cases, models and mappers)\n├── 📂 ui/                  # View layer (Fragments, Adapters, ViewModels)\n│   ├── 📂 camera/          # Media capture (photo/video) fragments and its ViewModels\n│   ├── 📂 common/          # Common components that are shared along the whole app\n│   ├── 📂 mainPage/        # Main app view and its ViewModel\n│   ├── 📂 preview/         # Media preview (photo/video) fragments and its ViewModels\n├── 🗒️ CameraXMvvmApp       # Application class for global inyection\n├── 🗒️ MainActivity         # Application entry point and navigation host\n```\n\n\n## 📸 Screenshots\n\n| | | |\n|---|---|---|\n| \u003cimg src=\"screenshots/01-Empty_main.png\" alt=\"Empty Main Screen\" width=\"200\"/\u003e \u003cbr\u003e **Main Screen (empty)** | \u003cimg src=\"screenshots/02-Camera_options.png\" alt=\"Camera Options\" width=\"200\"/\u003e \u003cbr\u003e **Camera Options** | \u003cimg src=\"screenshots/03-Camera_picture.png\" alt=\"Taking Picture\" width=\"200\"/\u003e \u003cbr\u003e **Taking a Picture** |\n| \u003cimg src=\"screenshots/04-Camera_selfie.png\" alt=\"Camera Selfie\" width=\"200\"/\u003e \u003cbr\u003e **Selfie Mode** | \u003cimg src=\"screenshots/05-Camera_picture_preview.png\" alt=\"Picture Preview\" width=\"200\"/\u003e \u003cbr\u003e **Picture Preview** | \u003cimg src=\"screenshots/06-Main_with_picture.png\" alt=\"Main with Picture\" width=\"200\"/\u003e \u003cbr\u003e **Main with Captured Photo** |\n| \u003cimg src=\"screenshots/07-Camera_record.png\" alt=\"Camera Record\" width=\"200\"/\u003e \u003cbr\u003e **Video Recording Screen** | \u003cimg src=\"screenshots/08-Camera_recording_selfie.png\" alt=\"Recording Selfie\" width=\"200\"/\u003e \u003cbr\u003e **Recording in Selfie Mode** | \u003cimg src=\"screenshots/09-Camera_record_preview.png\" alt=\"Recording Preview\" width=\"200\"/\u003e \u003cbr\u003e **Recorded Video Preview** |\n| \u003cimg src=\"screenshots/10-Main_with_video.png\" alt=\"Main with Video\" width=\"200\"/\u003e \u003cbr\u003e **Main with Saved Video** | \u003cimg src=\"screenshots/11-Recorded_video_view.png\" alt=\"Recorded Video View\" width=\"200\"/\u003e \u003cbr\u003e **Playback Recorded Video** | |\n\n\n## 🧑‍💻 Author\n\n- [@samuel0122](https://www.github.com/samuel0122)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuel0122%2Fandroid-camerax-mvvm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamuel0122%2Fandroid-camerax-mvvm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuel0122%2Fandroid-camerax-mvvm/lists"}