Android library for easy camera preview rendering. You don't need to worry about camera errors because library does it for you.
repositories {
maven {
url "https://dl.bintray.com/dananas/android"
}
}
dependencies {
implementation "com.github.dananas:camera:0.4.0"
}<com.github.dananas.camera.view.CameraView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cameraId="0" />val cameraStarter = CameraStarterFactory.create(context = this)cameraStarter.start(cameraId = "0", listOf(surfaceHolder.surface))
// later on
cameraStarter.stop()
// note that you should always call stop when you done working with camera.MIT