get Camera Supported Picture Sizes - Android Camera

Android examples for Camera:Camera Size

Description

get Camera Supported Picture Sizes

Demo Code


//package com.java2s;
import java.util.List;

import android.hardware.Camera.Size;
import android.os.Build;

public class Main {
    public static List<Size> getCameraSupportedPictureSizes(
            android.hardware.Camera camera) {

        if ((Build.VERSION.SDK_INT >= 5) && (camera != null)) {
            if (camera.getParameters().getSupportedPictureSizes() != null) {
                return camera.getParameters().getSupportedPictureSizes();
            }//from   w  w  w.  j a v a  2s. c  o  m
        }

        return null;
    }
}

Related Tutorials