Enum Class BiometricError
- All Implemented Interfaces:
Serializable, Comparable<BiometricError>, Constable
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
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe plugin's -115 (Android source): the arguments could not be parsed.The plugin's -102: the check failed (iOS:LAErrorAuthenticationFailed; Android only through its secret slot, out of IIZI's scope).The plugin's -108: the user dismissed the prompt (cancel, the system cancelled it, or on iOS the user cancelled).The plugin's -104: the device has no biometric hardware, or it is unavailable (AndroidBIOMETRIC_ERROR_NO_HARDWAREandBIOMETRIC_ERROR_HW_UNAVAILABLE).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.The plugin's -111: too many failed attempts, biometrics are locked out for a while.The plugin's -112: biometrics are locked out until the user unlocks the device with the device credential.The plugin's -113: its secret slot holds no secret (out of IIZI's scope; never produced by a check).The plugin's -106: no biometric is enrolled on the device.The plugin's -105: the app has no permission to use biometrics.The plugin's -109: the user dismissed Android's device credential screen, the one a prompt that allows the device credential leads to.The plugin's -110: the device has no secure lock screen (iOS: no passcode set).The plugin's -103: the platform SDK does not support biometrics.The plugin's -101: biometrics are not available on this device (iOS:LAErrorBiometryNotAvailable).The plugin's -100: an error it does not name, or a platform code it passed through.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)).IIZI's own: a check of this client session is already waiting for the client; one at a time.IIZI's own: the client's answer carried neither a success nor an error code.IIZI's own: the client is not iiziRun (a Browser, the Designer, a PWA), so there is no plugin to ask.IIZI's own: the client is iiziRun but its build does not carry the plugin (a Customized iiziRun built withplugin_fingerprintoff).IIZI's own: the client session was disposed of while the check waited for the client.IIZI's own: the client did not answer within the prompt's timeout (BiometricPrompt.timeout(long)).IIZI's own: the client reported that it runs on a simulator or an emulator and the prompt refuses one (BiometricPrompt.rejectVirtual(boolean)).Field Summary
FieldsModifier and TypeFieldDescriptionfinal intThe code: the plugin's for theBIOMETRIC_...members, IIZI's own from -200 on.Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if the user ended the check rather than failing it: the prompt or the device credential screen dismissed.booleanChecks if this error is one of the plugin's (BIOMETRIC_...), as opposed to IIZI's own.static BiometricErrorof(int code) Gets the error of a code.static BiometricErrorReturns the enum constant of this class with the specified name.static BiometricError[]values()Returns an array containing the constants of this enum class, in the order they are declared.
Enum Constant Details
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
The plugin's -101: biometrics are not available on this device (iOS:LAErrorBiometryNotAvailable).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
The plugin's -103: the platform SDK does not support biometrics.BIOMETRIC_HARDWARE_NOT_SUPPORTED
The plugin's -104: the device has no biometric hardware, or it is unavailable (AndroidBIOMETRIC_ERROR_NO_HARDWAREandBIOMETRIC_ERROR_HW_UNAVAILABLE).BIOMETRIC_PERMISSION_NOT_GRANTED
The plugin's -105: the app has no permission to use biometrics.BIOMETRIC_NOT_ENROLLED
The plugin's -106: no biometric is enrolled on the device.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
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
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
The plugin's -110: the device has no secure lock screen (iOS: no passcode set).BIOMETRIC_LOCKED_OUT
The plugin's -111: too many failed attempts, biometrics are locked out for a while.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
The plugin's -113: its secret slot holds no secret (out of IIZI's scope; never produced by a check).BIOMETRIC_ARGS_PARSING_FAILED
The plugin's -115 (Android source): the arguments could not be parsed.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
IIZI's own: the client is iiziRun but its build does not carry the plugin (a Customized iiziRun built withplugin_fingerprintoff).TIMEOUT
IIZI's own: the client did not answer within the prompt's timeout (BiometricPrompt.timeout(long)).SESSION_CLOSED
IIZI's own: the client session was disposed of while the check waited for the client.IN_PROGRESS
IIZI's own: a check of this client session is already waiting for the client; one at a time.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
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
IIZI's own: the client's answer carried neither a success nor an error code.
Field Details
code
public final int codeThe code: the plugin's for theBIOMETRIC_...members, IIZI's own from -200 on.
Method Details
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
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 nameNullPointerException- 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_DISMISSEDandBIOMETRIC_PIN_OR_PATTERN_DISMISSED.
of
Gets the error of a code.- Parameters:
code- The code the client answered.- Returns:
- The error with that code, or
BIOMETRIC_UNKNOWN_ERRORfor a code no member has (a platform code the plugin passed through, or a newer plugin's).