I was trying to think over of a solution that an application\'s screen size will be flexible on different screen sizes of devices. I thought of getting the device\'s camera heig
This is a way:
Camera.Parameters params = mCamera.getParameters(); // mCamera is a Camera object
List<Camera.Size> sizes = params.getSupportedPreviewSizes();
// position: variable where you choose between different supported resolutions,
// this varies from phone to phone, even the order can be different,
// ex. ascending or descending order.
mFrameWidth = (int) sizes.get(position).width;
mFrameHeight = (int) sizes.get(position).height;
params.setPreviewSize(mFrameWidth, mFrameHeight);
mCamera.setParameters(params);