Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Glamdring/EasyCamera
Wrapper around the android Camera class that simplifies its usage
https://github.com/Glamdring/EasyCamera
Last synced: 2 months ago
JSON representation
Wrapper around the android Camera class that simplifies its usage
- Host: GitHub
- URL: https://github.com/Glamdring/EasyCamera
- Owner: Glamdring
- License: apache-2.0
- Created: 2014-03-27T09:24:16.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-08-09T11:22:12.000Z (over 7 years ago)
- Last Synced: 2024-06-26T03:33:47.637Z (7 months ago)
- Language: Java
- Size: 24.4 KB
- Stars: 643
- Watchers: 26
- Forks: 101
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - EasyCamera - Wrapper around the android Camera class that simplifies its usage (etc)
- awesome - EasyCamera - Wrapper around the android Camera class that simplifies its usage (etc)
README
EasyCamera
==========Wrapper around the android Camera class that simplifies its usage (read more about the process)
Usage:
```java
// the surface where the preview will be displayed
SurfaceView surfaceView = (SurfaceView) findViewById(R.id.surfaceView);
EasyCamera camera = DefaultEasyCamera.open();
CameraActions actions = camera.startPreview(surfaceView.getHolder());
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()`
How to import in maven:
```xml
net.bozho.easycamera
easycamera
0.0.1
aar
```
How to import in gradle:
```groovy
compile 'net.bozho.easycamera:easycamera:0.0.1:aar@aar'
```