CameraKit/camerakit-android logo

CameraKit/camerakit-android

Free

Library for Android Camera 1 and 2 APIs. Massively increase stability and reliability of photo and video capture on all Android devices.

FreeFree tier
Type
Open Source

About CameraKit/camerakit-android

CameraKit is an open-source Android library that simplifies adding reliable camera functionality to applications. It provides consistent capture results across all Android devices by abstracting over Camera 1 and Camera 2 APIs. Key capabilities include simultaneous image and video capture from the same preview session, automatic system permission handling, automatic preview scaling, support for CameraViews of any size, and automatic cropping to match view bounds. The library offers multiple capture methods: METHOD_STANDARD (standard camera API capture), METHOD_STILL (freeze frame similar to Snapchat and Instagram), and METHOD_SPEED (automatic method selection based on measured speed). It also includes built-in continuous focus, tap-to-focus, and pinch-to-zoom features. CameraKit currently maintains two versions: v1.0.0-beta3.11 (photo-only with video support coming soon) and v0.13.4 (stable build with full photo and video support).

Key Features

Image and video capture seamlessly working with the same preview session
Automatic system permission handling
Automatic preview scaling
Create CameraView of any size (not just presets)
Automatic output cropping to match CameraView bounds
Multiple capture methods: METHOD_STANDARD, METHOD_STILL, METHOD_SPEED
Built-in continuous focus
Built-in tap to focus
Built-in pinch to zoom
Two supported versions: photo-only beta and stable full photo+video

Pros & Cons

Pros
  • Provides consistent capture results across all Android devices
  • Simple setup via Gradle dependency and layout XML
  • Automatic handling of camera permissions and preview scaling
  • Offers multiple capture methods to optimize for speed or quality
  • Active open-source project with community support and documentation
Cons
  • Latest beta version (v1.0.0-beta3.11) does not support video (video support is coming)
  • Requires additional dependencies: jpegkit, Kotlin standard library, and coroutines
  • Documentation is hosted on an external site (camerakit.io) rather than fully in-repo

Best For

Building Android apps that require reliable camera captureQuickly integrating camera functionality with minimal boilerplateEnsuring consistent photo and video capture across diverse Android devices

FAQ

Does CameraKit support video capture?
Yes, but there are two versions: v1.0.0-beta3.11 supports photos only (video support is coming), while v0.13.4 is a stable build with full photo and video support.
How do I set up CameraKit in my project?
Add the dependencies to your app-level build.gradle: implementation 'com.camerakit:camerakit:1.0.0-beta3.11', implementation 'com.camerakit:jpegkit:0.1.0', implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.0', and implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.0.0'. Then add the CameraKitView to your layout XML.
What are the different capture methods?
CameraKit provides METHOD_STANDARD (normal camera API capture), METHOD_STILL (a freeze frame of the preview, similar to SnapChat and Instagram), and METHOD_SPEED (automatically picks the best method based on measured device speed).