Enum Class BiometricError

java.lang.Object
java.lang.Enum<BiometricError>
com.iizix.gyro.BiometricError
All Implemented Interfaces:
Serializable, Comparable<BiometricError>, Constable

public enum BiometricError extends Enum<BiometricError>
Why a biometric check of IBiometricAuthentication failed, or why none can be made (CC-IIZIRUN-BIOMETRIC-API).

The BIOMETRIC_... members are the error codes of iiziRun's plugin cordova-plugin-fingerprint-aio 6.0.1, with the plugin's own names and codes (www/Fingerprint.js, -100 to -113; BIOMETRIC_ARGS_PARSING_FAILED is its Android source's -115). The others, from -200 on, are IIZI's own. A code the plugin passes through from the platform (Android's BiometricPrompt error codes are positive) is BIOMETRIC_UNKNOWN_ERROR, with the platform's code and message kept in the BiometricResult.

Author:
Christopher Mindus
  • Enum Constant Details

    • BIOMETRIC_UNKNOWN_ERROR

      public static final BiometricError BIOMETRIC_UNKNOWN_ERROR
      The plugin's -100: an error it does not name, or a platform code it passed through. The platform's code and message are in the result.
    • BIOMETRIC_UNAVAILABLE

      public static final BiometricError BIOMETRIC_UNAVAILABLE
      The plugin's -101: biometrics are not available on this device (iOS: LAErrorBiometryNotAvailable).
    • BIOMETRIC_AUTHENTICATION_FAILED

      public static final BiometricError BIOMETRIC_AUTHENTICATION_FAILED
      The plugin's -102: the check failed (iOS: LAErrorAuthenticationFailed; Android only through its secret slot, out of IIZI's scope).
    • BIOMETRIC_SDK_NOT_SUPPORTED

      public static final BiometricError BIOMETRIC_SDK_NOT_SUPPORTED
      The plugin's -103: the platform SDK does not support biometrics.
    • BIOMETRIC_HARDWARE_NOT_SUPPORTED

      public static final BiometricError BIOMETRIC_HARDWARE_NOT_SUPPORTED
      The plugin's -104: the device has no biometric hardware, or it is unavailable (Android BIOMETRIC_ERROR_NO_HARDWARE and BIOMETRIC_ERROR_HW_UNAVAILABLE).
    • BIOMETRIC_PERMISSION_NOT_GRANTED

      public static final BiometricError BIOMETRIC_PERMISSION_NOT_GRANTED
      The plugin's -105: the app has no permission to use biometrics.
    • BIOMETRIC_NOT_ENROLLED

      public static final BiometricError BIOMETRIC_NOT_ENROLLED
      The plugin's -106: no biometric is enrolled on the device.
    • BIOMETRIC_INTERNAL_PLUGIN_ERROR

      public static final BiometricError BIOMETRIC_INTERNAL_PLUGIN_ERROR
      The plugin's -107: an error inside the plugin; IIZI's client bridge reports an exception thrown by the plugin's JavaScript with this code.
    • BIOMETRIC_DISMISSED

      public static final BiometricError BIOMETRIC_DISMISSED
      The plugin's -108: the user dismissed the prompt (cancel, the system cancelled it, or on iOS the user cancelled).
    • BIOMETRIC_PIN_OR_PATTERN_DISMISSED

      public static final BiometricError BIOMETRIC_PIN_OR_PATTERN_DISMISSED
      The plugin's -109: the user dismissed Android's device credential screen, the one a prompt that allows the device credential leads to.
    • BIOMETRIC_SCREEN_GUARD_UNSECURED

      public static final BiometricError BIOMETRIC_SCREEN_GUARD_UNSECURED
      The plugin's -110: the device has no secure lock screen (iOS: no passcode set).
    • BIOMETRIC_LOCKED_OUT

      public static final BiometricError BIOMETRIC_LOCKED_OUT
      The plugin's -111: too many failed attempts, biometrics are locked out for a while.
    • BIOMETRIC_LOCKED_OUT_PERMANENT

      public static final BiometricError BIOMETRIC_LOCKED_OUT_PERMANENT
      The plugin's -112: biometrics are locked out until the user unlocks the device with the device credential.
    • BIOMETRIC_NO_SECRET_FOUND

      public static final BiometricError BIOMETRIC_NO_SECRET_FOUND
      The plugin's -113: its secret slot holds no secret (out of IIZI's scope; never produced by a check).
    • BIOMETRIC_ARGS_PARSING_FAILED

      public static final BiometricError BIOMETRIC_ARGS_PARSING_FAILED
      The plugin's -115 (Android source): the arguments could not be parsed.
    • NOT_IIZIRUN

      public static final BiometricError NOT_IIZIRUN
      IIZI's own: the client is not iiziRun (a Browser, the Designer, a PWA), so there is no plugin to ask.
    • PLUGIN_ABSENT

      public static final BiometricError PLUGIN_ABSENT
      IIZI's own: the client is iiziRun but its build does not carry the plugin (a Customized iiziRun built with plugin_fingerprint off).
    • TIMEOUT

      public static final BiometricError TIMEOUT
      IIZI's own: the client did not answer within the prompt's timeout (BiometricPrompt.timeout(long)).
    • SESSION_CLOSED

      public static final BiometricError SESSION_CLOSED
      IIZI's own: the client session was disposed of while the check waited for the client.
    • IN_PROGRESS

      public static final BiometricError IN_PROGRESS
      IIZI's own: a check of this client session is already waiting for the client; one at a time.
    • VIRTUAL_DEVICE

      public static final BiometricError VIRTUAL_DEVICE
      IIZI's own: the client reported that it runs on a simulator or an emulator and the prompt refuses one (BiometricPrompt.rejectVirtual(boolean)).
    • EMULATED

      public static final BiometricError EMULATED
      IIZI's own: the client's answer came from iiziRun Developer's biometric emulation, and the prompt did not allow it or the server is not a development server (BiometricPrompt.allowEmulated(boolean)).
    • NO_ANSWER

      public static final BiometricError NO_ANSWER
      IIZI's own: the client's answer carried neither a success nor an error code.
  • Field Details

    • code

      public final int code
      The code: the plugin's for the BIOMETRIC_... members, IIZI's own from -200 on.
  • Method Details

    • values

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

      public static BiometricError valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • isPluginError

      public boolean isPluginError()
      Checks if this error is one of the plugin's (BIOMETRIC_...), as opposed to IIZI's own.
      Returns:
      true for a plugin error.
    • isDismissed

      public boolean isDismissed()
      Checks if the user ended the check rather than failing it: the prompt or the device credential screen dismissed.
      Returns:
      true for BIOMETRIC_DISMISSED and BIOMETRIC_PIN_OR_PATTERN_DISMISSED.
    • of

      public static BiometricError of(int code)
      Gets the error of a code.
      Parameters:
      code - The code the client answered.
      Returns:
      The error with that code, or BIOMETRIC_UNKNOWN_ERROR for a code no member has (a platform code the plugin passed through, or a newer plugin's).