How to create a camera preview using android API 21?

Since google API 21 recommends using the new android.hardware.camera2 file I tried to find examples of using the new API to create a camera preview, but nothing was found. Can any body give me an example? Many thanks!

+8
android api camera preview
source share
3 answers

you can view this example, maybe this will help you

Camera for Android2Basic

This example demonstrates the basic use of the Camera2 API. Check the source code to see how you can display a camera preview and take pictures. Background

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

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

+11
source share

Please check this Github Repo for the Android L Camera Viewer Library (API 21) PkmX / lcamera

+4
source share
+1
source share

All Articles