Android examples for Camera:Camera Size
get Camera Supported Video Sizes by SDK version
//package com.java2s; import java.util.List; import android.annotation.SuppressLint; import android.hardware.Camera.Size; import android.os.Build; public class Main { @SuppressLint("NewApi") public static List<Size> getCameraSupportedVideoSizes( android.hardware.Camera camera) { List sizes;/*from w w w .java2 s . c o m*/ if ((Build.VERSION.SDK_INT >= 11) && (camera != null)) { if (camera.getParameters().getSupportedVideoSizes() != null) { sizes = camera.getParameters().getSupportedVideoSizes(); } else { // Video sizes may be null, which indicates that all the supported // preview sizes are supported for video recording. sizes = camera.getParameters().getSupportedPreviewSizes(); } return sizes; } else { return null; } } }