Java tutorial
//package com.java2s; import android.hardware.Camera; import android.os.Build; public class Main { public static void setFlash(Camera.Parameters parameters) { if (Build.MODEL.contains("Behold II") && Build.VERSION.SDK_INT == 3) { // 3 parameters.set("flash-value", 1); } else { parameters.set("flash-value", 2); } parameters.set("flash-mode", "off"); } }