Dump camera Parameters To String - Android Camera

Android examples for Camera:Camera Feature

Description

Dump camera Parameters To String

Demo Code


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

import android.hardware.Camera.Parameters;

public class Main {
    public static String cameraParamsToString(Parameters p) {
        String toRet = "ColorEffects: "
                + getConcatenatedList(p.getSupportedColorEffects());
        toRet = toRet + "  SupportedFocusModes: "
                + getConcatenatedList(p.getSupportedFocusModes());
        toRet = toRet + "  SupportedFlashModes: "
                + getConcatenatedList(p.getSupportedFlashModes());
        return toRet;
    }//from   w  ww .  j  av  a 2 s . c o  m

    private static String getConcatenatedList(List<String> list) {
        String toRet = "";
        for (String entry : list) {
            toRet = toRet + " " + entry;
        }
        return toRet;
    }
}

Related Tutorials