You are here
Home > Android > Android Camera 2 Api Example With & Without Preview

Android Camera 2 Api Example With & Without Preview

Hi, Friends today I am going to share code by which you can use android camera 2 api to click picture. I’d created two classes named as CameraControllerV2WithPreview for taking picture with preview and another one is CameraControllerV2WithoutPreview for taking picture without preview. Camera 2 Api is latest Api introduced in android version Lollipop, So Camera 2 Api can be used in Lollipop and higher versions of android.

So here is the code,

CameraControllerV2WithPreview.java

CameraControllerV2WithoutPreview.java

AutoFitTextureView.java

MainActivity.java

activity_main.xml

content_main.xml

Output

Android Camera 2 Api Example With & Without Preview

Android Studio Project Download

Thanks

Please share if you like and if you have any question you can ask in comment

 

Rajesh Kumar Sahanee
I am a passionate Java Developer and I like Computer Programming. I love to do some interesting experiments and listening music in my free time.
http://www.zatackcoder.com

Comments

zatackcoder
Top