Android examples for Camera:Camera Size
Returns a list of available camera picture sizes, or null if the Android API to get the sizes is not available.
//package com.java2s; import java.lang.reflect.Method; import java.util.List; import android.hardware.Camera; public class Main { /** Returns a list of available camera picture sizes, or null if the Android API to get the sizes is not available. *///www. j a v a 2s.co 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; } } }