Android examples for android.hardware:Camera Size
Returns a list of available camera picture sizes
import android.graphics.Bitmap; import android.hardware.Camera; import java.lang.reflect.Method; import java.util.Collections; import java.util.List; public class Main{ /** Returns a list of available camera picture sizes, or null if the Android API to get the sizes is not available. *///from w ww .jav a 2 s . c o m public static List<Camera.Size> pictureSizesForCameraParameters( Camera.Parameters params) { try { Method m = params.getClass().getMethod( "getSupportedPictureSizes"); return (List<Camera.Size>) m.invoke(params); } catch (Exception ex) { return null; } } }