In my app, I was able to run a code using the camera class to take pictures, but it gives me 2048 x 1536 pixels as the image size.
When I use the default camera of m
en Click here
ch Click here
I have same problem in my work. I use that to solution my problem.
for example i use undercode in my SurfaceView(CameraPreview)
Camera.Parameters parameters = camera.getParameters();
pictureSize = MyCamPara.getInstance().getPictureSize(
parameters.getSupportedPictureSizes(), 800);
previewSize = MyCamPara.getInstance().getPreviewSize(
parameters.getSupportedPreviewSizes(), getHeight());
if (previewSize != null)
parameters
.setPreviewSize(previewSize.width, previewSize.height);
if (pictureSize != null)
parameters
.setPictureSize(pictureSize.width, pictureSize.height);
camera.setPreviewDisplay(holder);
camera.setParameters(parameters);
camera.startPreview();