Android examples for android.hardware:Flash
get Current Flash Mode
import android.graphics.Bitmap; import android.hardware.Camera; import java.lang.reflect.Method; import java.util.Collections; import java.util.List; public class Main{ public static String getCurrentFlashMode(Camera camera) { Camera.Parameters params = camera.getParameters(); try {/*from ww w. j a v a2 s .c o m*/ Method getModeMethod = params.getClass().getMethod( "getFlashMode"); return (String) getModeMethod.invoke(camera); } catch (Exception ex) { return null; } } }