Enum BiometricPromptType

java.lang.Object
java.lang.Enum<BiometricPromptType>
com.codename1.security.BiometricPromptType
All Implemented Interfaces:
Comparable<BiometricPromptType>

public enum BiometricPromptType extends Enum<BiometricPromptType>

What an application should call the device's biometric authentication in its own UI -- the wording and icon of a "sign in with ..." button. Returned from Biometrics.getPromptType().

It is one answer on every platform and OS release, so an application needs no platform or version check to choose its wording.

  • Enum Constant Details

    • NONE

      public static final BiometricPromptType NONE
      Biometric authentication cannot be used right now: no hardware, nothing enrolled, or locked out. Offer the password only.
    • FINGERPRINT

      public static final BiometricPromptType FINGERPRINT
      Ask for a fingerprint (Touch ID on iOS).
    • FACE

      public static final BiometricPromptType FACE
      Ask for the face (Face ID on iOS).
    • BIOMETRICS

      public static final BiometricPromptType BIOMETRICS
      Biometric authentication can be used and there is no single name for it. Use neutral wording ("Use biometrics"); the system prompt directs the user to the right sensor. An Android device with more than one kind of biometric hardware answers this, because Android reports that some biometric is enrolled and not which one. So do an iris scanner and Windows Hello, which may verify with a PIN.
  • Method Details

    • values

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