You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Dylan McIntyre 561121609c Add table of contents heading 8 years ago
.repo Intro, features, and setup for README 8 years ago
camerakit Intro, features, and setup for README 8 years ago
demo Intro, features, and setup for README 8 years ago
gradle/wrapper Initial commit 8 years ago
.gitignore Basic demo app 8 years ago
LICENSE Initial commit 8 years ago
README.md Add table of contents heading 8 years ago
build.gradle setup cameralistener middleware 8 years ago
gradle.properties Initial commit 8 years ago
gradlew Initial commit 8 years ago
gradlew.bat Initial commit 8 years ago
settings.gradle rename to demo, automatically centerCrop camera preview based on size 8 years ago

README.md

CameraKit Header

CameraKit is an extraordinarily easy to use utility to work with the infamous Android Camera and Camera2 APIs. Built by Dylan McIntyre.

Try out all the unique features using the CameraKit Demo from the Google Play store!

Get it on Google Play

Table of Contents

Features

  • Image and video capture seamlessly working with the same preview session.
  • Automatic system permission handling.
  • Automatic preview scaling.
    • Create a CameraView of any size (not just presets!).
    • Automatic output cropping to match your CameraView bounds.
  • Multiple capture modes.
    • PICTURE_MODE_QUALITY: an image captured normally using the camera APIs.
    • PICTURE_MODE_SPEED: a freeze frame of the CameraView preview (similar to SnapChat and Instagram) for devices with slower cameras.
    • Automatic picture mode determination based on measured speed.

Setup

Add CameraKit to the dependencies block in your app level build.gradle:

compile 'com.flurgle:camerakit:1.0.0'

Usage

To use CameraKit, simply add a CameraView to your layout:

<com.flurgle.camerakit.CameraView
    android:id="@+id/camera"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />

Make sure you override onResume and onPause in your activity, and make calls respectively to CameraView.start() and CameraView.stop().

@Override
protected void onResume() {
    super.onResume();
    cameraView.start();
}

@Override
protected void onPause() {
    cameraView.stop();
    super.onPause();
}

Extra Attributes

Extra attributes

Capturing images

Capturing photos

Capturing Video

Capturing video

Automatic Permissions Behavior

Automatic permissions behavior

Dynamic Sizing Behavior

Dynamic sizing behavior

Capture Mode Behavior

Capture mode behavior

Credits

Dylan McIntyre

License

CameraKit-Android is MIT licensed.