I have tried to implement the code for taking picture programatically in Android using front camera from source available on github.
The source code works fine on other devices like Micromax, Lenovo, but when I tried to test on Samsung Galaxy Grand Quatro Duos, the application crashed saying that:
takePicture failed at android.hardware.Camera.native_takePicture(Native Method) at android.hardware.Camera.takePicture(Camera.java:1194)
Can anyone help me about this issue? Moreover the camera class is deprecated over Api 21 Lollipop and I have to implement the same code using Camera2 API; if anyone knows how to implement the same using Camera2 API please post code or reference link.