Enum Class BiometricType

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

public enum BiometricType extends Enum<BiometricType>
The kind of biometric check a client device offers, as iiziRun's plugin (cordova-plugin-fingerprint-aio) reports it to IBiometricAuthentication (CC-IIZIRUN-BIOMETRIC-API).

The plugin answers its isAvailable with one word: finger (Touch ID, or Android below API 28), face (Face ID), optic (Optic ID on visionOS; IIZI's hot-code-fix of the plugin's iOS source adds it) or biometric (Android API 28 and later, which never says which kind the device has). DEVICE_CREDENTIAL is IIZI's own: the device has no biometric check but has a passcode, PIN, pattern or password that BiometricPrompt.allowDeviceCredential(boolean) can let stand in.

Author:
Christopher Mindus
  • Enum Constant Details

  • Field Details

    • pluginName

      public final String pluginName
      The word the plugin's isAvailable answers for this type, none for NONE and credential (IIZI's own) for DEVICE_CREDENTIAL.
  • Method Details

    • values

      public static BiometricType[] 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 BiometricType 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
    • isBiometric

      public boolean isBiometric()
      Checks if this type is a biometric: anything but NONE and DEVICE_CREDENTIAL.
      Returns:
      true for a biometric.
    • of

      public static BiometricType of(String pluginName)
      Gets the type the plugin's word names.
      Parameters:
      pluginName - The word the plugin's isAvailable answered, or null.
      Returns:
      The type: NONE for null, empty or none, the named type, or BIOMETRIC for a word this version does not know (a newer plugin's: the check is available, its kind is not known).