# Enum BiometricError

java.lang.Object
java.lang.Enum<BiometricError>
com.codename1.security.BiometricError

All Implemented Interfaces:
  `Comparable<BiometricError>`

public enum BiometricError extends Enum<BiometricError>
Typed error codes returned by `Biometrics` and `SecureStorage` when an asynchronous operation fails. Callers branch on these codes via `BiometricException.getError()` instead of string-matching error messages, which makes localization and recovery logic straightforward.

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `AUTHENTICATION_FAILED`
  Authentication completed but the user was not recognized.
  `KEY_REVOKED`
  A previously-stored `SecureStorage` entry can no longer be decrypted because the user enrolled new biometrics or disabled device security since the entry was written.
  `LOCKED_OUT`
  Too many failed attempts; biometric prompt is temporarily disabled.
  `NOT_AVAILABLE`
  Biometric hardware is not present, or is disabled by policy.
  `NOT_ENROLLED`
  Hardware is present but the user has not enrolled any biometrics.
  `PASSCODE_NOT_SET`
  The device has no passcode / PIN / pattern configured.
  `PERMANENTLY_LOCKED_OUT`
  Too many failed attempts and the user must unlock with their device passcode or PIN before biometrics can be used again.
  `SYSTEM_CANCELED`
  The OS cancelled the prompt (app backgrounded, system pre-empted, etc.).
  `UNKNOWN`
  Anything not covered by the more specific codes.
  `USER_CANCELED`
  The user explicitly cancelled the prompt.

- ## Method Summary

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

  - ### NOT_AVAILABLE

    public static final BiometricError NOT_AVAILABLE
    Biometric hardware is not present, or is disabled by policy.

  - ### NOT_ENROLLED

    public static final BiometricError NOT_ENROLLED
    Hardware is present but the user has not enrolled any biometrics.

  - ### LOCKED_OUT

    public static final BiometricError LOCKED_OUT
    Too many failed attempts; biometric prompt is temporarily disabled.

  - ### PERMANENTLY_LOCKED_OUT

    public static final BiometricError PERMANENTLY_LOCKED_OUT
    Too many failed attempts and the user must unlock with their device passcode or PIN before biometrics can be used again.

  - ### PASSCODE_NOT_SET

    public static final BiometricError PASSCODE_NOT_SET
    The device has no passcode / PIN / pattern configured.

  - ### USER_CANCELED

    public static final BiometricError USER_CANCELED
    The user explicitly cancelled the prompt.

  - ### SYSTEM_CANCELED

    public static final BiometricError SYSTEM_CANCELED
    The OS cancelled the prompt (app backgrounded, system pre-empted, etc.).

  - ### AUTHENTICATION_FAILED

    public static final BiometricError AUTHENTICATION_FAILED
    Authentication completed but the user was not recognized.

  - ### KEY_REVOKED

    public static final BiometricError KEY_REVOKED
    A previously-stored `SecureStorage` entry can no longer be decrypted because the user enrolled new biometrics or disabled device security since the entry was written. Callers must re-prompt and re-write the entry.

  - ### UNKNOWN

    public static final BiometricError UNKNOWN
    Anything not covered by the more specific codes.

- ## Method Details

  - ### values

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