I need to create a custom camera in Android that supports both higher and lower version.I am new to android.I have research a lot I have the code ready for hardware camera i.e. for the api less than 21.But I am finding hard time searching the code that supports camera hardware 2.
The old deprecated camera API still works on Android 21 and above. But you are right, using the new API is preferable, and gives you more options and better performance.
You can start with the official Camera2Basic sample.
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