Skip to content

Commit

Permalink
Add basic usage to the readme file.
Browse files Browse the repository at this point in the history
  • Loading branch information
rasheedsulayman committed Nov 8, 2019
1 parent 903810b commit 8052ef9
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,47 @@
# HiddenCamera
A library that allows you to take picture secretly, in the background without alerting users.
[![Build Status](https://travis-ci.org/CottaCush/HiddenCam.svg?branch=master)](https://travis-ci.org/CottaCush/HiddenCam)
##

## Gradle Dependency

Add the dependency to your app's `build.gradle`:

```groovy
implementation 'com.cottacush:HiddenCamera:0.0.1'
```

## Usage

It is very easy to get started with Hidden cam.
First, initialize the camera engine with a `Context`, A `File` that
represents the base storage folder where the captured images will be saved to,
and an `OnImageCapturedListener` to get the capture results:

```kotlin
val hiddenCam = HiddenCam(context, baseStorageFolder, captureListener)
```
Then prepare the camera for capturing by calling the `start()` method:

```kotlin
hiddenCam.start()
```
You can now start capturing images with:
```kotlin
hiddenCam.captureImage()
```
When you are no longer actively capturing images, stop the camera engine to free the camera hardware by calling:

```kotlin
hiddenCam.stop()
```
Finally, to clean up call

```kotlin
hiddenCam.destroy()
```

That's all for basic setup. The captured images should be save at the storage folder provided.


## License

Expand Down

0 comments on commit 8052ef9

Please sign in to comment.