I have the code for the Camera2 from https://github.com/googlesamples/android-Camera2Basic.
The problem i\'m facing is that when i turn to my Front Camera, i cannot capt
For Camera2 Api, Google's example for video works great for both front and back camera, but for Image capturing, Google's example works only for back camera and not for front camera.
Solution which works for me is
In lockFocus()
method, replace line
mCaptureSession.capture(mPreviewRequestBuilder.build(),
mCaptureCallback, mBackgroundHandler);
with
captureStillPicture();
Hope this will help!!