add events section to readme

pull/1/head
Dylan McIntyre 8 years ago
parent 8ab330ffd5
commit 7b692e0f56
  1. 31
      README.md

@ -12,6 +12,7 @@ Try out all the unique features using the CameraKit Demo from the Google Play st
- [Features](#features)
- [Setup](#setup)
- [Usage](#usage)
- [Events](#events)
- [Extra Attributes](#extra-attributes)
- [`ckCropOutput`](#ckcropoutput)
- [`ckFacing`](#ckfacing)
@ -70,6 +71,36 @@ protected void onPause() {
}
```
### Events
Make sure you can react to different camera events by setting up a `CameraListener` instance.
```java
camera.setCameraListener(new CameraListener() {
@Override
public void onCameraOpened() {
super.onCameraOpened();
}
@Override
public void onCameraClosed() {
super.onCameraClosed();
}
@Override
public void onPictureTaken(byte[] picture) {
super.onPictureTaken(picture);
}
@Override
public void onVideoTaken(File video) {
super.onVideoTaken(video);
}
});
```
### Extra Attributes
```xml

Loading…
Cancel
Save