I have an application that supports back to Android API 19 (KitKat) and there is heavy Camera use internally.
Currently, android.hardware.camera2
is the recommended way of using the camera API and android.hardware.Camera
is deprecated.
Is there a way to support API 19 and stop using android.hardware.Camera
without getting deprecation warnings in my build? If so, how?
The only other question I could find was this but it doesn't answer my question.
you would use
if(Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
//use old camera API
}else{
//use new camera API
}
then you can support what you want
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With