How to create camera preview using API 21 android?

TOP picture TOP · Dec 3, 2014 · Viewed 17.1k times · Source

Since API 21 google recommend using the new android.hardware.camera2 I tried to find examples of using new API to create camera preview, but nothing was found. Can any body give me an example? Thanks so much!

Answer

A-Droid Tech picture A-Droid Tech · Dec 3, 2014

you can view this example may this will help you

Android Camera2Basic Sample

This sample demonstrates the basic use of Camera2 API. Check the source code to see how you can display camera preview and take pictures. Pre-requisites

Android SDK v21 Android Build Tools v21.1.1 Android Support Repository

https://github.com/googlesamples/android-Camera2Basic