Read this in other languages: English | 日本語
Jetpack Compose-based Android camera app providing real-time preview and photo capture, with Android 15 features and internationalization.
- MainActivity – Initializes Android 15 capabilities and displays
CameraScreen. - CameraScreen – Compose UI handling permission checks, preview, capture, and photo review.
- CameraViewModel – Manages camera state via
StateFlow, including zoom, flash, and capture logic. - Utilities / Components
- Permission management (
PermissionUtils) - Android 15 feature utilities (
Android15Features) - Image display (
AsyncImage)
- Permission management (
- Theme – Material Design 3 with dynamic color and dark mode.
| Camera Preview | Photo Preview |
|---|---|
![]() |
![]() |
| Real-time camera preview display | Photo confirmation and delete function |
| Camera Preview | Photo Preview |
|---|---|
![]() |
![]() |
| Real-time camera preview display | Photo confirmation and delete function |
- 🎥 Real-time Preview - High-quality camera preview with CameraX 1.4.2
- 📷 High-quality Capture - JPEG photo capture and auto-save (Pictures/VTuberCamera folder)
- 🔄 Camera Switching - Seamless front/back camera switching
- ⚡ Flash Control - 3 modes support: ON/OFF/AUTO
- 🔍 Zoom Function - Pinch gesture and button zoom controls
- 🖼️ Preview Mode - Instant photo confirmation and delete function
- 📐 Rotation Support - Automatic adjustment for device rotation
- 🌟 Material Design 3 - Latest design system implementation
- 🌙 Dark Mode Support - System setting integration
- 🎨 Dynamic Color - Android 12+ dynamic theme support
- 📱 Declarative UI - Intuitive interface with Jetpack Compose
- ⚡ Fast Response - Startup time < 2s, capture response < 200ms
- Language: Kotlin 1.9.25
- UI Framework: Jetpack Compose 1.7.8
- Camera: CameraX 1.4.2
- Architecture: MVVM + StateFlow
- Design: Material Design 3
- Image Processing: Coil 2.7.0
- Dependency Management: Dependabot Automation
- Android Studio: Koala or above (Kotlin 1.9.25 support required)
- Gradle: 8.12+ (Android Gradle Plugin 8.12.1)
- Min SDK: 25 (Android 7.1+)
- Target SDK: 36 (Android 16)
- Compile SDK: 36 (Android 16 support)
- JDK: 11+ (Kotlin 1.9.25 recommended)
- Launch App - Tap the camera icon to start the application
- Grant Permission - Approve camera usage permission
- Take Photo - Use the center capture button to take photos
- Preview - Tap the thumbnail in the bottom right to view captured photos
- Camera Switching: Tap the switch icon in the top right
- Flash Control: Tap the flash icon in the top right to change settings (OFF→ON→AUTO→OFF)
- Zoom Operations:
- Pinch in/out gesture
- +/- buttons in the bottom left
- Photo Management: Delete or save options in preview mode
- AR Avatar Documentation - Complete guide for VRM avatar AR functionality
- VRM Requirements - VRM file specifications and optimization guidelines
- AR User Guide - Step-by-step guide for using AR features
- Troubleshooting - Common issues and solutions
📦 VtuberCamera
├── 📱 app/src/main/
│ ├── 🏠 MainActivity.kt # Main entry point
│ ├── 📄 AndroidManifest.xml # App manifest and permissions
│ │
│ ├── 🎯 java/com/example/vtubercamera/
│ │ ├── 🎥 ui/screens/CameraScreen.kt # Camera screen implementation (Compose)
│ │ ├── 🏗️ ui/viewmodels/CameraViewModel.kt # State management (MVVM)
│ │ ├── 🎨 ui/components/AsyncImage.kt # Image display component
│ │ ├── 🎨 ui/theme/ # Material Design 3 theme
│ │ │ ├── Theme.kt # App theme definition
│ │ │ ├── Color.kt # Color palette
│ │ │ └── Type.kt # Typography
│ │ └── 🔧 utils/ # Utility classes
│ │ ├── Android15Features.kt # Android 15 feature support
│ │ └── PermissionUtils.kt # Permission management utilities
│ │
│ └── 📂 res/
│ ├── 🌐 values/strings.xml # English resources (default)
│ ├── 🇯🇵 values-ja/strings.xml # Japanese resources
│ ├── 🎨 drawable/ # Icon and image resources
│ ├── 🖼️ mipmap-*/ # App icons (each resolution)
│ ├── 🎵 raw/ # Audio files
│ │ ├── camera_shutter.mp3 # Shutter sound
│ │ └── enter_app.mp3 # App startup sound
│ ├── 🔧 xml/ # Configuration files
│ └── 📐 layout/ # Legacy layouts (for reference)
│
├── 🔨 app/
│ ├── build.gradle # App-level build configuration
│ └── proguard-rules.pro # ProGuard configuration (for release)
│
├── 📚 docs/ # Project documentation
│ ├── CHANGE_LOG.md # Detailed changelog
│ └── images/ # Screenshots
│ ├── camera_preview.png # Camera preview (Japanese)
│ ├── photo_preview.png # Photo preview (Japanese)
│ ├── camera_preview_en.png # Camera preview (English)
│ └── photo_preview_en.png # Photo preview (English)
│
├── 🤖 .github/ # GitHub automation configuration
│ └── dependabot.yml # Automatic dependency update configuration
│
├── 🔧 Project configuration files
│ ├── build.gradle # Project-level build configuration (Kotlin 1.9.25)
│ ├── settings.gradle # Gradle settings
│ ├── gradle.properties # Gradle properties (Kotlin 1.9.25 optimization)
│ ├── local.properties # Local environment configuration
│ └── README.md # Project overview (this file)
│
└── 🔒 .git/ # Git management files
- MainActivity.kt: Jetpack Compose setup and camera screen display
- CameraScreen.kt: Integration of all camera features including preview, capture, and permission management
- CameraViewModel.kt: Management of camera state, captured photos, and preview mode
- values/strings.xml: English resources (fallback)
- values-ja/strings.xml: Japanese resources
- stringResource(): Type-safe string references within Compose
- Android15Features.kt: New features like Private Space and background restrictions
- PermissionUtils.kt: New permission support including partial photo access
- AndroidManifest.xml: Added READ_MEDIA_VISUAL_USER_SELECTED permission
- AsyncImage.kt: Efficient image loading component using Coil
- Theme.kt: Material Design 3 dynamic color and dark mode support
- Color.kt & Type.kt: Consistent design system
| Category | Files | Primary Role |
|---|---|---|
| 📱 Core | MainActivity.kt | App entry point, Compose integration |
| 🎥 Camera | CameraScreen.kt | Complete camera functionality implementation (capture, preview, permissions) |
| 🏗️ State | CameraViewModel.kt | MVVM state management, lifecycle handling |
| 🎨 UI | ui/theme/* | Material Design 3 theme system |
| 🔧 Utils | utils/* | Android 15 support, permission management utilities |
| 🌐 i18n | values*/strings.xml | Multi-language resources (Japanese/English) |
| 📚 Docs | docs/* | Development history, screenshots, technical documentation |
| ⚙️ Config | *.gradle, *.xml | Build configuration, ProGuard, permission settings |
- Android Studio Koala or above (Kotlin 1.9.25 requirement)
- JDK 11 or above
- Gradle 8.12 or above
- Android SDK 25 or above
-
Clone the repository
git clone https://github.com/yourusername/VtuberCamera.git cd VtuberCamera -
Open in Android Studio
- Launch Android Studio
- Select "Open an existing project"
- Choose the cloned folder
-
Sync dependencies
./gradlew sync
-
Run the app
- Connect device/emulator
- Click the Run button
- MVVM Pattern: ViewModel + StateFlow
- Unidirectional Data Flow: State-driven UI updates
- Compose Integration: Declarative UI paradigm
// CameraX (1.4.2)
implementation "androidx.camera:camera-core:1.4.2"
implementation "androidx.camera:camera-camera2:1.4.2"
implementation "androidx.camera:camera-lifecycle:1.4.2"
implementation "androidx.camera:camera-view:1.4.2"
implementation "androidx.camera:camera-extensions:1.4.2"
// Jetpack Compose (1.7.8)
implementation "androidx.compose.ui:ui:1.7.8"
implementation "androidx.compose.material3:material3:1.3.2"
implementation "androidx.activity:activity-compose:1.10.1"
// ViewModel & StateFlow (2.9.2)
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.9.2"
implementation "androidx.core:core-ktx:1.17.0"
// Image Processing (2.7.0)
implementation "io.coil-kt:coil-compose:2.7.0"
// Kotlin 1.9.25 + Compose Compiler 1.5.15
id 'org.jetbrains.kotlin.android' version '1.9.25'
kotlinCompilerExtensionVersion = "1.5.15"- ✅ CameraX Integration: 98% Android device compatibility
- ✅ Efficient State Management: Memory-efficient with StateFlow
- ✅ Compose Optimization: Minimized recomposition
- ✅ Battery Efficiency: Proper lifecycle management
- ✅ Preview Stability: Stable camera preview during screen transitions
- Startup Time: < 2 seconds
- Capture Response: < 200ms
- Memory Usage: < 200MB
- Battery Efficiency: 95% compared to standard camera apps
For detailed development history and technical changes, please see CHANGE_LOG.md.
🎯 Key Changes
- DefaultLocale Fix: Resolved lint warning by specifying explicit locale for string formatting
- Lens Switching Enhancement: Fixed camera selectors to use specific camera IDs for proper lens switching
- Ultra-Wide Support: Fixed zoom range to support 0.5x magnification on ultra-wide cameras
- Pinch Gesture Reset: Enhanced gesture logic to allow repeated lens switching without tapping
- ✅ Basic Camera Functions - Implementation of capture, preview, and save features
- ✅ Flash Control - Complete support for OFF/ON/AUTO modes
- ✅ Camera Switching - Stabilized front/back switching
- ✅ Zoom Function - Button controls
- ✅ State Management Optimization - Stable operation during preview mode changes
- ✅ Automatic Dependency Management - Weekly automatic updates with Dependabot
- ✅ Testing Foundation - Mockito-based test construction for CameraViewModelTest.kt
- Video recording is not yet supported—only photo capture is available.
- Tap-to-focus may fail in low-light environments.
- Clone this repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Create a Pull Request
- Create new issues from Issues
- Bug reports, feature requests, questions - feel free to ask
- Complete CameraViewModelTest.kt Implementation - Implementation of 14 test methods
- Add Other ViewModel Tests - Improve test coverage for all components
- Monitor Dependabot Operations - Confirm stability of automatic updates
- Utilize Latest Library Features - Research new features of AGP 8.12.0, Compose 2.2.0
- Achieve 80% Test Coverage - Complete implementation of unit tests and integration tests
- Complete CI/CD Pipeline Automation - Test, build, and deploy with GitHub Actions
- Automate Performance Measurement - Continuous monitoring of build time and memory usage
- Video Recording Feature - Implementation of CameraX VideoCapture
- Camera Filters & Effects Features - Real-time image processing
- E2E Test Implementation - Integration testing with Espresso and UIAutomator
- Consider Kotlin Multiplatform Migration - iOS support and code sharing
- AI Feature Integration - Face tracking and object detection with ML Kit
- VTuber-specific Feature Implementation - Avatar integration, motion tracking
Made with ❤️ for VTuber Community
🐛 Bug Report | 💡 Feature Request | 📖 Documentation | ⭐ Star this repo



