Note: OpenKamera is a modernized Kotlin version of the popular open-source Open Camera application (based on v1.56.2) originally developed by Mark Harman. The Kotlin port, architecture modernization, and ongoing maintenance are developed by Ridhan Fadhilah.
OpenKamera is a powerful, fully open-source camera application for Android smartphones and tablets. It translates the robust, feature-rich Java codebase of Open Camera (v1.56.2) into idiomatic Kotlin while targeting modern Android APIs and Gradle toolchains.
OpenKamera is designed with privacy and user control in mind: no ads, no tracking, and no unnecessary permissions.
OpenKamera uses the Camera2 API by default on devices where every camera reports at least LIMITED Camera2 hardware support, which manual controls, RAW capture and the live metadata overlays need. If no camera has that support, or at least one camera is LEGACY (Camera2 only wrapping the old driver), OpenKamera falls back to the original Camera1 API with a reduced feature set and tells you once. Where at least one camera supports Camera2 you can choose either API in Settings → Camera API. See Choosing Camera1 or Camera2.
OpenKamera is not just an app — it's an educational resource for intermediate Android developers who want to understand how camera applications really work.
The docs/ folder contains a structured curriculum covering:
- Photography Primer — optics, the Exposure Triangle, smartphone fixed-aperture physics, shooting modes, and practical field recipes
- Camera2 API fundamentals and the session/capture model
- Preview lifecycle and coroutine-based async camera management
- Photo capture pipelines, flash sequencing, burst mode, and HDR processing
- Video recording with MediaRecorder, codec selection, and A/V sync
- Advanced patterns — reactive metadata flows, HUD rendering, device quirks, and clean architecture
👉 Start learning → docs/README.md
- Manual Focus & Exposure: Full control over focus distance, ISO, shutter speed (exposure time), and white balance temperature.
- Exposure Compensation & Lock: Lock exposure and white balance to maintain consistent lighting.
- Focus Modes: Auto, Continuous, Macro, Infinity, Manual, and Locked focus modes.
- RAW Capture: Support for RAW (DNG) image capture on supported hardware.
- Auto-Level / Auto-Stabilize: Keep photos perfectly aligned regardless of device tilt.
- HDR (High Dynamic Range): Capture and blend multiple exposures for high-contrast scenes.
- DRO (Dynamic Range Optimization): Enhance shadows and balance highlights in a single shot.
- Panorama & Focus Bracketing: Multi-shot stitching and deep depth-of-field capture.
- Burst & Fast Burst Modes: High-speed multi-frame capture with configurable delays.
- Noise Reduction: Advanced multi-frame noise reduction.
- Resolution & Frame Rates: Support up to 4K UHD, high frame rate (HFR), and slow motion.
- Bitrate & Profiles: Configurable video bitrates, frame rates, and color profiles.
- Audio Options: Choose audio sources (external mic, internal mic, uncalibrated), channels (mono/stereo), and sample rates.
- Video Stabilization: Digital video stabilization (EIS) support.
- On-Screen Display: Real-time histogram, zebra stripes (highlight clipping), and focus peaking.
- Composition Guides: 3x3 grids, golden ratio, diagonal guides, and custom crop overlays.
- Angle & Compass: Live orientation indicator, pitch/roll level, and compass direction.
- Geotagging & Stamping: GPS location tagging, timestamping, date stamping, and custom text stamps on photos.
- Remote Controls: Audio trigger (shout/whistle), timer, repeat mode, and Bluetooth remote control support.
- UI Customization: Optimized for both left-handed and right-handed use, immersive full-screen mode, and configurable quick controls.
The codebase is organized into modular packages under com.hightechif.openkamera:
com.hightechif.openkamera/
├── audio/ # Audio trigger, speech recognition, and sound effects
├── cameracontroller/ # Camera2 controller, engine bridge and pipelines
│ └── capabilities/ # Camera feature resolution (zoom, focus, flash, etc.)
├── di/ # Hilt dependency injection modules (camera, coroutines, prefs, etc.)
├── domain/ # Clean architecture domain layer
│ ├── engine/ # Camera engine interfaces
│ ├── interactor/ # Use-case orchestrators
│ ├── model/ # Pure domain models
│ ├── repository/ # Repository interfaces
│ └── usecase/ # Individual business logic use cases
├── lifecycle/ # Lifecycle coordinators (camera, orientation)
├── preferences/ # SharedPreferences management, keys, and settings UI
├── preview/ # Camera preview surface, rendering, and lifecycle
├── processing/ # Image processing, HDR alignment, and computations
├── remotecontrol/ # Bluetooth LE and remote shutter controls
├── sensors/ # Accelerometer, compass, and orientation sensors
├── storage/ # Storage Access Framework (SAF), Exif, and ImageSaver
├── system/ # Android system integrations, permissions, and services
├── ui/ # UI components, popup menus, and custom view overlays
├── utils/ # General helpers, math, and string formatters
├── MainActivity.kt # Core application entrypoint and activity coordinator
└── TakePhoto.kt # Lightweight shortcut widget activity
- Language: Kotlin
2.0.21 - Build System: Gradle with Version Catalogs (
gradle/libs.versions.toml) - Android Gradle Plugin (AGP):
8.7.3 - JDK / Toolchain: Java 17
- Target SDK: 36 (Android 16)
- Minimum SDK: 23 (Android 6.0 Marshmallow)
- Dependency Injection: Hilt
2.51.1(via KSP2.0.21-1.0.27) - Async / Reactive: Kotlin Coroutines
1.9.0+StateFlow/SharedFlow - Lifecycle: AndroidX Lifecycle
2.8.7(ViewModel,repeatOnLifecycle) - Testing: JUnit 4, Robolectric
4.14.1, MockK1.13.16, Turbine1.2.0, AndroidX Test & Espresso
- Android Studio Ladybug | 2024.2+ or newer
- JDK 17
- Android SDK Platform 36 and Build Tools
Clone the repository and open the OpenKamera directory:
# Build the debug APK
./gradlew assembleDebug
# Run unit tests
./gradlew testDebugUnitTest
# Install to a connected device
./gradlew installDebugOpenKamera has a multi-layer test suite covering unit logic, ViewModel state, and real-device UI flows:
| Suite | Type | Key areas |
|---|---|---|
MainInstrumentedTest |
Instrumented (Espresso) | Camera lifecycle, zoom, focus, flash, UI controls |
PhotoInstrumentedTest |
Instrumented (Espresso) | Photo capture, EXIF tags, burst mode |
Camera2InstrumentedTest |
Instrumented | Camera2 API feature resolution |
EspressoCameraUiInstrumentedTest |
Instrumented (Espresso) | Full UI interaction flows |
*UnitTest / *RobolectricTest |
JVM (Robolectric + MockK + Turbine) | ViewModel, use cases, capabilities |
# Run all JVM unit tests (Robolectric, MockK, Turbine)
./gradlew testDebugUnitTest
# Run all connected instrumentation tests (requires connected device/emulator)
./gradlew connectedDebugAndroidTest
# Run a specific instrumented test class
./gradlew connectedDebugAndroidTest \
-Pandroid.testInstrumentationRunnerArguments.class=com.hightechif.openkamera.test.MainInstrumentedTest- Original Author & Base Codebase: Mark Harman — Open Camera v1.56.2
- Kotlin Version Developer (OpenKamera): Ridhan Fadhilah
- License: Released under the terms of the GNU General Public License v3.0 (GPLv3).
- Third-party components, AndroidX libraries, and Google Material Design icons are licensed under their respective open-source licenses (see LICENSE,
_docs/credits.html,androidx_LICENSE-2.0.txt, andgoogle_material_design_icons_LICENSE-2.0.txt).