I have the following code in my app:
camera = Camera.open(CameraInfo.CAMERA_FACING_FRONT);
Camera.Parameters setting_param = camera.getParameters();
setting_param.setPreviewSize(128,128);
camera.setParameters(setting_param);
Camera.Parameters read_param = camera.getParameters();
Camera.Size sz = read_param.getPreviewSize();
The code works exactly as expected on my galaxy tab 10.1 running Android 3.1. but on My Galaxy S II phone running 4.1.2, the width and height of the preview, i.e. sz.width and sz.height are 640 and 480! Is this a bug in 4.1.2, or a consequence of an error of mine I am getting away with in 3.1 and not getting away with in 4.1.2?