Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
bozhanov
committed
Mar 28, 2014
1 parent
34c8d88
commit 11ec4e5
Showing
1 changed file
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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()` |