Android examples for android.hardware:Camera Feature
set Camera White Balance
import java.util.List; import android.hardware.Camera.Parameters; public class Main { public static void setWhiteBalance(Parameters params, String value) { List<String> supported = params.getSupportedWhiteBalance(); String supportedValue = getSupportedValue(supported, value); if (supportedValue == null) { return;//from w w w .j ava2s. c o m } params.setWhiteBalance(supportedValue); } private static String getSupportedValue(List<String> supported, String value) { return (supported != null) && supported.contains(value) ? value : null; } }