# Enum CameraFacing

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

All Implemented Interfaces:
  `Comparable<CameraFacing>`

public enum CameraFacing extends Enum<CameraFacing>
Direction a camera faces relative to the device screen.

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `BACK`
  Camera on the opposite side of the display (the main rear camera).
  `EXTERNAL`
  Externally attached camera (USB, accessory).
  `FRONT`
  Camera on the same side as the display (selfie camera).

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static CameraFacing`
  `valueOf(String name)`
  Returns the enum constant of this type with the specified name.
  `static CameraFacing[]`
  `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 java.lang.Object

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

- ## Enum Constant Details

  - ### FRONT

    public static final CameraFacing FRONT
    Camera on the same side as the display (selfie camera).

  - ### BACK

    public static final CameraFacing BACK
    Camera on the opposite side of the display (the main rear camera).

  - ### EXTERNAL

    public static final CameraFacing EXTERNAL
    Externally attached camera (USB, accessory). Rare; not supported on all platforms.

- ## Method Details

  - ### values

    public static CameraFacing[] 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 CameraFacing 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