I have developed an android application. In that i have used front facing camera functionality. Its working fine but I need to auto capture. i.e. without click shutter butto
write this code in on create to auto capture image
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_custom__camera_activity);
mCamera = getCameraInstance();
mCameraPreview = new CameraPreview(this, mCamera);
FrameLayout preview = (FrameLayout) findViewById(R.id.camera_preview);
preview.addView(mCameraPreview);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
{
mCamera.takePicture(null, null, mPicture);
}
}
}, 5500);
}