I want to take a photo using SurfaceView and PictureCallBack with the highest resolution supported.
Here is the configuration that works for my Galaxy Nexus:
Camera.Parameters params = camera.getParameters();
List<Camera.Size> sizes = params.getSupportedPictureSizes();
Toast.makeText(MainActivity.this,"Supported Sizes: " + sizes,Toast.LENGTH_LONG).show();
params.setPictureSize(2592, 1944);
params.setJpegQuality(100);
camera.setParameters(params);
The 2592 x 1944, is the best resolution for my device, but how I get from the var sizes the highest resolution for any devices?
Thank you for the help!
Loop through your list, and multiply the height and width to get the pixel count and keep a variable of the largest index