In this blog about, Android Camera Library learn how you can easily implement the camera feature in your app.
Need some career advice or prepping for an Android developer interview? Hit me up on Topmate.io, and let's chat!
With filters, image detection and different other functionalitites, power up your app by implementing libraries build by other developers.
Here is a list of 25 such Android Camera Library curated on basis of proper documentation and updation.
Android Camera Library
CameraView Android Camera Library (Java)
CameraView is a well documented, high-level library that makes capturing pictures and videos easy, addressing most of the common issues and needs, and still leaving you with flexibility where needed.
The library has following features:
- Its Fast & reliable
- Gestures support
- Frame processing support
- OpenGL powered preview
- Take high-quality content with
takePicture
andtakeVideo
- Take super-fast snapshots with
takePictureSnapshot
andtakeVideoSnapshot
- Smart sizing: create a
CameraView
of any size - Control HDR, flash, zoom, white balance, exposure, location, grid drawing & more
- Lightweight: the only dep. is support
ExifInterface
- Works down to API level 15
- Well tested
Read the official website for setup instructions and documentation.
To implement this library in your Android Studio project, add the following line of code to your build.gradle (app) dependencies:
dependencies {
implementation 'com.otaliastudios:cameraview:2.0.0-beta04'
}
Long Image Camera (Java)
A camera view to capture long image merged from small captured images as it is in Shoparoo app!
This library uses CameraView from Google as the backbone of camera functionality and adds auto-support of creating long or wide images from multiple images.
This library includes:
- Built-in Camera UI and activity
- Built-in Image Viewer with pinch-fling gestures for zoom/move/rotate etc.
- TouchImageView with gestures support for zoom/move/rotate etc.
- Built-in permission handling for Camera and Storage
- Horizontal or Vertical image merging
To implement this library in your Android Studio project, add the following line of code to your build.gradle (app) dependencies:
dependencies {
implementation 'com.wajahatkarim3.LongImageCamera:LongImageCamera:1.0.2'
}
Live Edge Detection (Java)
LiveEdgeDetection is an Android document detection library built on top of OpenCV.
It scans documents from camera live mode and allows you to adjust crop using the detected 4 edges and performs perspective transformation of the cropped image.
It works best with a dark background.
To implement this library in your Android Studio project, add the following line of code to your build.gradle (app) dependencies:
allprojects {
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}
}
dependencies {
implementation 'com.github.adityaarora1:LiveEdgeDetection:1.0.6'
// Other dependencies your app might use
}
Camera Touch Button (Java)
Simple component to capture photo
Keep the button pressed to open the camera release the button to capture the photo 🙂
This library uses CameraKit-Android
To implement this library in your Android Studio project, add the following line of code to your build.gradle (app) dependencies:
repositories {
mavenCentral()
maven {
url "https://safety.bintray.com/maven"
}
}
dependencies {
implementation 'br.com.safety:camera-touch-button:2.4'
}
Android Hidden Camera (Java)
This library allows application to take the picture using the device camera without showing the preview of it.
Any application can capture the image from front or rear camera from the background service and this library will handle all the complexity on behalf of the application.
You can capture images from activity, fragment and even from the background service using this library.
To implement this library in your Android Studio project, add the following line of code to your build.gradle (app) dependencies:
dependencies {
implemenatation'com.kevalpatel2106:hiddencamera:1.3.3'
}
Sandrios Camera Android Camera Library (Java)
Sandrios Android Camera Library allows the developers to integrate image and video capturing without dealing with the complicated camera APIs.
It includes image picker interface inside the cameraview enabling the user to access recent media from inside the camera module.
To implement this library in your Android Studio project, add the following line of code to your build.gradle (app) dependencies:
repositories {
jcenter()
}
dependencies {
implementation 'com.sandrios.android:sandriosCamera:1.1.0'
}
Camera Fragment (Java)
A simple easy-to-integrate Camera Fragment for Android.
CameraFragment preview directly the camera view, and provides a easy API to capture or manage the device
You can setup your own layout and control the camera using CameraFragment.
To implement this library in your Android Studio project, add the following line of code to your build.gradle (app) dependencies:
dependencies{
implementation 'com.github.florent37:camerafragment:1.0.10'
}
This library also comes with Android Widgets, you can see here:
Annca Android Camera Library (Java)
Android solution to simplify work with different camera apis. Include video and photo capturing features with possibility to select quality for appropriate media action etc.
In current solution were used some approaches from Grafika project and Google camera sample
To implement this library in your Android Studio project, add the following line of code to your build.gradle (app) dependencies:
dependencies {
implementation 'io.github.memfis19:annca:0.3.7'
}
Photo BarCode Android Camera Library (Java)
An easy to use Android Camera library to take picture or scanning barcodes in the Android application.
Add this in your root build.gradle
file (not your module build.gradle
file):
allprojects { repositories { maven { url "https://jitpack.io" } } }
Then, add the library to your module build.gradle
dependencies { implementation 'com.github.ivan200:PhotoBarcode:1.1.1' }
Camera Filter (Java)
Realtime camera filters. Process frames by OpenGL shaders. The camera has around 20 filter types.
See more here: https://github.com/nekocode/CameraFilter
Track Eyes (Java)
A simple ? tracking and ? detection android app. Useful for creating a video player app.
This project uses the Google Vision API, read the tutorial here.
DC Cam (Java)
A Custom camera Demo App. In this Demo we can take pictures and record videos too.
If someone wants to upload pictures or videos from its own app to main the quality of app content. And if you want to add a limit to user , that user should only able to record video up to certain length. Like instagram then this demo is for you.
CameraKit Android Camera Library (Java)
CameraKit helps you add reliable camera to your app quickly.
The open source camera platform provides consistent capture results, service that scales, and endless camera possibilities.
With CameraKit you are able to effortlessly do the following:
- Image and video capture seamlessly working with the same preview session.
- Automatic system permission handling.
- Automatic preview scaling.
- Create a
CameraView
of any size (not just presets!). - Automatic output cropping to match your
CameraView
bounds.
- Create a
- Multiple capture methods.
METHOD_STANDARD
: an image captured normally using the camera APIs.METHOD_STILL
: a freeze frame of theCameraView
preview (similar to SnapChat and Instagram) for devices with slower cameras.METHOD_SPEED
: automatic capture method determination based on measured speed.
- Built-in continuous focus.
- Built-in tap to focus.
- Built-in pinch to zoom.
To include CameraKit in your project, add the following to your app level build.gradle.
dependencies {
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'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.0.0'
}
Camera2 Video (Java)
A simple Android wrapper for interfacing with the new Camera2 API for video capture.
This is not being maintained anymore. Issue’s wont be addressed, but you’re more than welcome to contribute any changes.
To implement this library in your Android Studio project, add the following line of code to your build.gradle (app) dependencies:
dependencies {
implementation 'com.wesleyelliott:camera2-video:0.0.2'
}
CameraView Ex (Kotlin | Java)
This is an extended version of Google’s cameraview library with better stability and many more features.
CameraViewEx highly simplifies integration of camera implementation and various camera features into any Android project. It uses new camera2 api with advanced features on API level 21 and higher and smartly switches to camera1 on older devices (API < 21).
Minimum API 14 is required to use CameraViewEx.
Features of using this library:
- High quality image capture
- Multiple camera modes like single capture, continuous frame, and video capture
- Ability to enable all or multiple modes simultaneously
- Preview frame listener
- Any size preview
- Customizable continuous frame and single capture output size (different from preview size and aspect ratio)
- Support multiple formats for output images like jpeg, yuv_420_888, rgba_8888
- Pinch to zoom
- Touch to focus
- Configurable auto white balance, auto focus, flash, noise reduction, and optical / video stabilization
- Highly configurable video recording with most of the options from MediaRecorder
- Support multiple aspect ratios
- Switch between front and back camera
- Adjustable output image quality
- Zero shutter lag mode
- Shutter animation for single capture
To implement this library in your Android Studio project, add the following line of code to your build.gradle (app) dependencies:
dependencies {
// ...
implementation "com.priyankvasa.android:cameraview-ex:3.5.1-alpha"
}
View Sample:
- Kotlin sample app – Advanced usage
- Java sample app – Very simple usage
Camera View Plus Android Camera Library (Java)
The aim of this library is to let you integrate camera features to your app, in case using Intent to launch default Camera cannot fulfill your requirements, such as overlaying images to your Camera preview.
This is a fork from Google’s CameraView. However here are some improvements:
- Resolved some bugs
- Implemented zoom feature (Configurable since v0.9.5)
- Improved API friendliness
- Changed return image from
byte[]
toBitmap
, with rotation degrees - Added camera event listeners
- Allow force fallback to Camera1
- Write this documentation…
- NEW! 0.9.0 Callback to get each frame of camera preview in high FPS
- NEW! 0.9.4 Configurable Preview and Capture image max resoultion
Features of this library:
- Using Camera2 API if the device’s OS API level >= 21 && Camera Device is not LEGACY.
- Support different aspect ratios (But I strongly suggest you use either 4:3 or 16:9)
- Able to switch between front and back camera
- Auto-focus (Well of course)
- Pinch zooming (Adjustable sensitivity)
- Handle orientation for you using device’s sensor (0.9.0)
- Flash light (But I haven’t changed any code about it, nor used it, nor tested it)
- Callback when focus is locked (i.e. You can play animation, if you like, when focus is locked)
- NEW! 0.9.0 Callback of each preview frame, passed to you in
byte[]
with width, height and rotation degrees - NEW! 0.9.4 Configurable Preview and Capture image max resoultion
To implement this library in your Android Studio project, add the following line of code to your build.gradle (app) dependencies:
dependencies{
implementation 'com.asksira.android:cameraviewplus:0.9.5'
}
Android Vision Pipeline (Java)
The bare bone pipeline infrastructure required for using google’s android vision detectors.
Most of the source codes were extracted from Google’s android vision sample.
To implement this library in your Android Studio project, add the following line of code to your build.gradle (app) dependencies:
dependencies {
implementation 'com.google.android.gms:play-services-basement:latest_version'
implementation 'com.google.android.gms:play-services-vision:latest_version'
implementation 'online.devliving:mobilevision-pipeline:latest_version'
}
Selfie Android Camera Library (Java)
A simple library to make taking screenshots of your apps a breeze.
With the Marshmallow release and the new permissions model, taking screenshots of your applications has become just slightly more complicated as you need to deal with permissions on the run.
How do i use it?
Two easy steps:
- From the activity you want to take screenshots or the application class initialise the
Selfie
. - Obtain
Selfie
‘s instance and use it throughout your app.
To implement this library in your Android Studio project, add the following line of code to your build.gradle (app) dependencies:
dependencies {
implementation 'uk.co.placona.selfie:selfie:1.0.0'
}
Fotoapparat Android Camera Library (Kotlin)
Camera API in Android is hard. Having 2 different API for new and old Camera does not make things any easier. But fret not, that is your lucky day! After several years of working with Camera, we came up with Fotoapparat.
What it provides:
- Camera API which does not allow you to shoot yourself in the foot.
- Simple yet powerful parameters customization.
- Standalone custom
CameraView
which can be integrated into anyActivity
. - Fixes and workarounds for device-specific problems.
- Both Kotlin and Java friendly configurations.
- Last, but not least, non 0% test coverage.
To implement this library in your Android Studio project, add the following line of code to your build.gradle (app) dependencies:
dependencies {
implementation 'io.fotoapparat:fotoapparat:2.7.0'
}
Magical Camera Android Camera Library (Java)
A Magic library to take photos and select pictures in Android.
In a simple way and if you need it also save the pictures in device, and facial recognition, get the real uri path or the photo or obtain the private information of the picture.
If you need to take photo or select picture, this is your solution.
This library give a magical solution for take a picture,write and red in device, return your uri real path and obtain yhe private info of the photo and facial recognition, you only need to download this and integrate this in your project, maybe downloading it or import in your gradle, like this.
repositories {
jcenter()
}
dependencies {
implementation 'com.frosquivel:magicalcamera:6.0.0'
}
If you have any problem with this dependence, because the library override any styles, colors or others, please change the last line for this code:
implementation ('com.frosquivel:magicalcamera:6.0.0@aar') {
transitive = false;
}
Camera Recorder (Java)
Video Recording with Camera2 and apply video filter.
To implement this library in your Android Studio project, add the following line of code to your build.gradle (app) dependencies:
allprojects { repositories { ... maven { url 'https://jitpack.io' } } } dependencies { implementation 'com.github.MasayukiSuda:CameraRecorder-android:v0.1.5' }
Rx Camera Android Camera Library (Java)
RxJava style camera API for android, it based on
android.hardware.camera
To implement this library in your Android Studio project, add the following line of code to your build.gradle (app) dependencies:
repositories {
jcenter()
}
dependencies {
compile 'com.ragnarok.rxcamera:lib:0.0.5'
}
Custom Camera (Java)
This library helps user to control camera resolution.
Add it in your root build.gradle at the end of repositories
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Then, add this in you app level build.gradle
dependencies {
implementation 'com.github.aliwaris0572:CustomCamera:1.7'
}
ParaCamera (Java)
Simple android camera to capture and get bitmaps in three simple steps:
- Build Camera
- Capture Camera
- Get Bitmap and Save Path
To implement this library in your Android Studio project, add the following line of code to your build.gradle (app) dependencies:
dependencies {
implementation 'com.mindorks:paracamera:0.2.2'
}
Camera View (Java)
This is not an official Google product.
CameraView aims to help Android developers easily integrate Camera features.
Requires API Level 9. The library uses Camera 1 API on API Level 9-20 and Camera2 on 21 and above.
Featues of this Android Camera Library:
- Camera preview by placing it in a layout XML (and calling the start method)
- Configuration by attributes
- Aspect ratio (app:aspectRatio)
- Auto-focus (app:autoFocus)
- Flash (app:flash)
1 comment