MCPcopy Index your code
hub / github.com/CameraKit/camerakit-android

github.com/CameraKit/camerakit-android @v0.13.5

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.13.5 ↗ · + Follow
555 symbols 1,020 edges 74 files 29 documented · 5% updated 2y agov0.13.5 · 2019-01-23★ 5,390161 open issues

Browse by type

Functions 409 Types & classes 146
What it actually does AI analysis from the code graph — generated when you open this
loading…
README
<a href="https://camerakit.io" target="_blank">
    <img alt='CameraKit Header' src='.repo/gh-readme-header.svg' />
</a>







<a href="https://play.google.com/store/apps/details?id=com.wonderkiln.camerakit.demo" target="_blank">
    <img alt='Google Play Link' height="42px" src='.repo/gh-readme-googleplay-demo-button.svg'/>
</a>
    <a href="https://spectrum.chat/camerakit/">
    <img alt="Join Spectrum" height="42px" src="https://github.com/CameraKit/camerakit-android/raw/v0.13.5/repo/gh-readme-spectrum-button.svg" >
</a>
<a href="https://buddy.works/" target="_blank">
    <img alt='Buddy.Works' height="41px" src='https://assets.buddy.works/automated-dark.svg'/>
</a>

CameraKit helps you add reliable camera to your app quickly. Our open source camera platform provides consistent capture results, service that scales, and endless camera possibilities.

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.x 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.10.

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.

Documentation Site

Setup instructions for 1.0.0-beta3.10 are below. To see the full documentation head over to our website, camerakit.io/docs.

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.10'
    implementation 'com.camerakit:jpegkit:0.1.0'
    implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.0'
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.0.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"   
    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);
}

ProGuard

If using ProGuard, add the following rules:

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

License

CameraKit is MIT License

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 395
Class 137
Function 14
Interface 6
Enum 3

Languages

Java81%
C++19%

Modules by API surface

camerakit/src/main/cpp/libjpeg/include/jpeglib.h53 symbols
camerakit/src/main/api16/com/wonderkiln/camerakit/Camera1.java52 symbols
camerakit/src/main/java/com/wonderkiln/camerakit/CameraView.java46 symbols
camerakit/src/main/base/com/wonderkiln/camerakit/CameraImpl.java29 symbols
camerakit/src/main/utils/com/wonderkiln/camerakit/BitmapOperator.java27 symbols
camerakit/src/main/cpp/libjpeg/include/jpegint.h22 symbols
demo/src/main/java/com/wonderkiln/camerakit/demo/MainActivity.java21 symbols
camerakit/src/main/base/com/wonderkiln/camerakit/PreviewImpl.java21 symbols
camerakit/src/main/utils/com/wonderkiln/camerakit/JpegTransformer.java17 symbols
camerakit/src/main/utils/com/wonderkiln/camerakit/AspectRatio.java17 symbols
camerakit/src/main/base/com/wonderkiln/camerakit/SurfaceViewPreview.java16 symbols
camerakit/src/main/api16/com/wonderkiln/camerakit/ConstantMapper.java16 symbols

For agents

$ claude mcp add camerakit-android \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page