From 7b692e0f568cb34dec98bbf28ff72d4a8fa53fcb Mon Sep 17 00:00:00 2001 From: Dylan McIntyre Date: Sun, 22 Jan 2017 19:51:04 -0500 Subject: [PATCH] add events section to readme --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/README.md b/README.md index 5c90b782..852adf31 100644 --- a/README.md +++ b/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