Hello I am trying to develop an application that uses a custom Camera, when I try to use the Camera class it was deprecated so I have used android hardware. Camera 2 and followed this tutorial
but when I try to add CameraDevice.StatecCallBack it gives me a warning that the min SDK should be 21 and my min SDK is 15 Now I'm confused if I used the old Camera API its deprecated if i used the new one it doesn't support my min SDK what should I do ?
"Deprecated" in Android usually means "we have something else that you should consider using". Deprecated classes and methods usually still work, and on older Android devices often times you have no choice but to use them.
So, your options are:
Use android.hardware.Camera
all the time, or
Use android.hardware.Camera
for devices running older than API Level 21, then use android.hardware.camera2.*
for devices running API Level 21+
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