Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
bozhanov committed Mar 28, 2014
1 parent 34c8d88 commit 11ec4e5
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion README.md
@@ -1,4 +1,22 @@
EasyCamera
==========

Wrapper around the android Camera class that simplifies its usage
Wrapper around the android Camera class that simplifies its usage (<a href="http://techblog.bozho.net/?p=1380&preview=true">read more</a> about the process)

Usage:

```java

EasyCamera camera = DefaultEasyCamera.open();
CameraActions actions = camera.startPreview(surface);
PictureCallback callback = new PictureCallback() {
public void onPictureTaken(byte[] data, CameraActions actions) {
// store picture
}
}
actions.takePicture(Callbacks.create().withJpegCallback(callback))
```

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()`

0 comments on commit 11ec4e5

Please sign in to comment.