# Enum FlashMode

java.lang.Object
java.lang.Enum<FlashMode>
com.codename1.camera.FlashMode

All Implemented Interfaces:
  `Comparable<FlashMode>`

public enum FlashMode extends Enum<FlashMode>
Flash behavior for still capture or continuous illumination.

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `AUTO`
  Camera decides whether to fire flash based on scene lighting.
  `OFF`
  Flash never fires.
  `ON`
  Flash fires for every still capture.
  `TORCH`
  Flash stays on continuously as a torch (also lights the preview).

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static FlashMode`
  `valueOf(String name)`
  Returns the enum constant of this type with the specified name.
  `static FlashMode[]`
  `values()`
  Returns an array containing the constants of this enum type, in the order they are declared.

  ### Methods inherited from class Enum

  `clone, compareTo, equals, getDeclaringClass, getEnumValues, hashCode, name, ordinal, setEnumValues, toString, valueOf`

  ### Methods inherited from class Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### OFF

    public static final FlashMode OFF
    Flash never fires.

  - ### ON

    public static final FlashMode ON
    Flash fires for every still capture.

  - ### AUTO

    public static final FlashMode AUTO
    Camera decides whether to fire flash based on scene lighting.

  - ### TORCH

    public static final FlashMode TORCH
    Flash stays on continuously as a torch (also lights the preview).

- ## Method Details

  - ### values

    public static FlashMode[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.
    Returns:
      an array containing the constants of this enum type, in the order they are declared

  - ### valueOf

    public static FlashMode valueOf(String name)
    Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
    Parameters:
      `name` - the name of the enum constant to be returned.
    Returns:
      the enum constant with the specified name
    Throws:
      `IllegalArgumentException` - if this enum type has no constant with the specified name
      `NullPointerException` - if the argument is null