get Available Video Size Strings - Android Media

Android examples for Media:Video

Description

get Available Video Size Strings

Demo Code


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

import android.hardware.Camera;

public class Main {
    public static String[] getAvailableVideoSizeStrings(
            Camera.Parameters parametrs) {
        List<Camera.Size> sizesList = parametrs.getSupportedPreviewSizes();
        String[] list = new String[sizesList.size()];

        for (int i = 0; i < sizesList.size(); i++) {
            list[i] = sizesList.get(i).width + "x"
                    + sizesList.get(i).height;
        }//  w  w  w  .  ja va2s .  c  om

        return list;
    }
}

Related Tutorials