Java tutorial
//package com.java2s; //License from project: Open Source License import android.hardware.Camera; import android.support.annotation.NonNull; import java.util.List; public class Main { static boolean isFlashModeSupported(@NonNull String flashMode, @NonNull Camera camera) { List<String> supportedFlashModes = camera.getParameters().getSupportedFlashModes(); return supportedFlashModes != null && supportedFlashModes.contains(flashMode); } }