Android examples for android.hardware:Flash
find Best Flash Mode Match
import java.util.List; import android.hardware.Camera; public class Main { public static String findBestFlashModeMatch(Camera.Parameters params, String... modes) { String match = null;//w w w . j a v a 2 s . c o m List<String> flashModes = params.getSupportedFlashModes(); if (flashModes != null) { for (String mode : modes) { if (flashModes.contains(mode)) { match = mode; break; } } } return (match); } }