Android CameraX Latest Implementation
Hy fellas, We face a lot of issues in implementing camera into your projects and it took some time to complete the implementation part which includes reading all documentations and the capability of devices(Android Version).
So I created an open-source package(Mini-camera) which is helps the developer to integrate the camera into the project without any hassle. With four lines of code, you can get camera support into your project.
Mini-Camera uses CameraX library
def camerax_version = "1.0.0-rc01"
implementation "androidx.camera:camera-camera2:${camerax_version}"
// If you want to additionally use the CameraX Lifecycle library
implementation "androidx.camera:camera-lifecycle:${camerax_version}"
// If you want to additionally use the CameraX View class
implementation "androidx.camera:camera-view:1.0.0-alpha20"
// If you want to additionally use the CameraX Extensions library
implementation "androidx.camera:camera-extensions:1.0.0-alpha20"
Don't worry about the above implementation ;) all you do is implement a Mini-camera.
So let’s see…
How to implement
Open Project.Gradle and add below line
allprojects {
repositories {
google()
jcenter()
//...
maven {
url "https://dl.bintray.com/arulmani/Mini-Camera"
}
}
}
And add the below line in App.Gradle inside dependency section
implementation ‘com.arul.minicamera:camerax:1.0.0’
Usage
And run the app….
That's all folks.
GitHub Link: