Skip to content
Wrapper around the android Camera class that simplifies its usage
Branch: master
Clone or download
Bozhidar Bozhanov
Latest commit aa643a2 Aug 9, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/main/java/net/bozho/easycamera renamed package Sep 10, 2014
.gitignore release updates Sep 6, 2014
LICENSE Initial commit Mar 27, 2014 Clarifying where surface comes from and fixing indentation Aug 9, 2017
maven-release.txt release updates Sep 6, 2014
pom.xml version up Sep 11, 2014 gitignore and Mar 28, 2014


Wrapper around the android Camera class that simplifies its usage (read more about the process)


// the surface where the preview will be displayed
SurfaceView surfaceView = (SurfaceView) findViewById(;
EasyCamera camera =;
CameraActions actions = camera.startPreview(surfaceView.getHolder());
PictureCallback callback = new PictureCallback() {
    public void onPictureTaken(byte[] data, CameraActions actions) {
        // store picture

By default, preview stops when a picture is taken. If you want to restart preview, specify .withRestartPreviewAfterCallbacks(true) on the Callbacks object

If you need the android.hardware.Camera object, get it via camera.getRawCamera()

How to import in maven:


How to import in gradle:

    compile 'net.bozho.easycamera:easycamera:0.0.1:aar@aar'
You can’t perform that action at this time.