CameraView icon indicating copy to clipboard operation
CameraView copied to clipboard

CameraX View + CameraX Analyzer

DEPRECATED

This library is not maintained anymore.

Use CameraX Preview instead of this library.

~~CameraView~~

CameraX View + CameraX Analyzer

License

Dependency

Add this in your root build.gradle file (not your module build.gradle file):

allprojects {
    repositories {
        maven { url "https://jitpack.io" }
    }
}

Then, add the library to your module build.gradle

dependencies {
    implementation 'com.github.fornewid:CameraView:1.0.0-alpha10'
}

Features

Usage

There is a sample provided which shows how to use the library in a simple way:

<androidx.camera.view.CameraView
    android:id="@+id/cameraView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:captureMode="image" />
val cameraView: CameraView = findViewById(R.id.cameraView)
photoView.setImageResource(R.drawable.image);
cameraView.bindToLifecycle(this)
cameraView.setAnalyzer { proxy ->
    ...
}