Could anyone provide a sample code for using the Camera API for Android 4.1 and 4.2 as given in this link: Link
I am currently using this code for older versions but it does not work in Jellybean devices
AutoFocusCallback myAutoFocusCallback = new AutoFocusCallback() {
@Override
public void onAutoFocus(boolean arg0, Camera arg1) {
// TODO Auto-generated method stub
if (arg0) {
if (mPreviewRunning) {
mCamera.takePicture(myShutterCallback, mPicture, mPicture);
}
} else {
flKeepClean.setVisibility(View.VISIBLE);
btnCamera.setEnabled(true);
side.setEnabled(true);
}
}
};
ShutterCallback myShutterCallback = new ShutterCallback() {
@Override
public void onShutter() {
// TODO Auto-generated method stub
}
};