Giter Site home page Giter Site logo

sumit-saurabh / camerakit-android Goto Github PK

View Code? Open in Web Editor NEW

This project forked from camerakit/camerakit-android

0.0 2.0 0.0 21.33 MB

Library for Android Camera 1 and 2 APIs. Massively increase stability and reliability of photo and video capture on all Android devices.

Home Page: https://camerakit.io

License: MIT License

CMake 0.16% Java 32.09% C++ 27.81% C 39.91% Shell 0.02%

camerakit-android's Introduction

CameraKit Header

Google Play Link Join Spectrum Buddy.Works

CameraKit takes one of the hardest Android APIs and makes it into a high level and easy to use library that solves all of your problems.

With CameraKit you are able to effortlessly do the following...

  • 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 methods.
    • METHOD_STANDARD: an image captured normally using the camera APIs.
    • METHOD_STILL: a freeze frame of the CameraView preview (similar to SnapChat and Instagram) for devices with slower cameras.
    • METHOD_SPEED: automatic capture method determination based on measured speed.
  • Built-in continuous focus.
  • Built-in tap to focus.
  • Built-in pinch to zoom.

Sponsored By

Expensify Buddy.Works

Trusted By

InFitting GooseChase Alpha Apps Expensify

Pardon the dust

CameraKit has been going through major changes in the past few months. We've slowed support on verison 0.13.2 and moved our focus to 1.0.0. This release will bring improved stability, faster processing and a standard API for future development of CameraKit. The lastest version is currently in beta, 1.0.0-beta3.9.

The code lives on the branch v1.0.0. You can read the discussion about 1.0.0 on the pull request #318. If you have a question or want to talk directly with the team, leave us a message on spectrum.chat.

With the official 1.0.0 release we will launch an all new documentation site. In the meantime check out the setup instructions for 1.0.0-beta3.9 below!

Setup

To include CameraKit in your project, add the following to your app level build.gradle.

dependencies {
    implementation 'com.camerakit:camerakit:1.0.0-beta3.9'
    implementation 'com.camerakit:jpegkit:0.1.0'
    implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.61'
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:0.24.0'
}

Usage

Create a CameraKitView in your layout as follows:

<com.camerakit.CameraKitView
    android:id="@+id/camera"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:adjustViewBounds="true"
    android:keepScreenOn="true"   <!-- keep screen awake while CameraKitView is active -->
    app:camera_flash="auto"
    app:camera_facing="back"
    app:camera_focus="continuous"
    app:camera_permissions="camera" />

Then create a new CameraKitView object in your Activity and override the following methods.

private CameraKitView cameraKitView;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    cameraKitView = findViewById(R.id.camera);
}

@Override
protected void onStart() {
    super.onStart();
    cameraKitView.onStart();
}

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

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

@Override
protected void onStop() {
    cameraKitView.onStop();
    super.onStop();
}

@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
    super.onRequestPermissionsResult(requestCode, permissions, grantResults);
    cameraKitView.onRequestPermissionsResult(requestCode, permissions, grantResults);
}

ProGaurd

If using ProGaurd, add the following rules:

-dontwarn com.google.android.gms.**
-keepclasseswithmembers class com.camerakit.preview.CameraSurfaceView {
    native <methods>;
}

License

CameraKit is MIT License

camerakit-android's People

Contributors

dwillmc avatar austinkettner avatar calebdre avatar yperess avatar emersoncloud avatar noln avatar asood123 avatar andreidiaconu avatar android-dataticket avatar 4brunu avatar andrewcross avatar eomine avatar andrewgable avatar shehabic avatar muratgu avatar dogs-never-lie avatar gasoline-joe avatar vanhoangtran avatar elevenfive avatar larryng avatar suomi35 avatar capezzbr avatar anpez avatar nethergrim avatar

Watchers

James Cloos avatar Sumit Saurabh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.