unlockWithBiometrics

public final Unit unlockWithBiometrics(FragmentActivity activity, String promptTitle, String promptSubtitle, String promptDescription, String negativeButtonText, Callback<UserPresenceVerification> callback)

Unlocking method that could be called prior to using a locked functionality, when the SDK LockConfigurationType is BIOMETRICS_ONLY or SDK_PIN_WITH_BIOMETRICS_OPTIONAL. This will display a biometric prompt to authenticate the user and the SDK will be unlocked if the verification is successful. Only biometrics classified as androidx.biometric.BiometricManager.Authenticators.BIOMETRIC_STRONG are supported.

Parameters

activity

the activity that will present the biometric authentication to the user.

promptTitle

the title that will be displayed in the Biometrics prompt.

promptSubtitle

the subtitle used for the Biometrics prompt.

promptDescription

the description used for the authentication prompt.

negativeButtonText

the text for the “cancel” button of the Biometrics prompt.

callback

used to receive the response of the unlock request.

See also

Throws

if the current SDK lock configuration does not support biometric authentication.

if biometric authentication is unavailable.

if the biometrics of the device have been changed or invalidated. This is a security concern and will render biometric authentication unusable.

Then for all lock configuration types except SDK_PIN_WITH_BIOMETRICS_OPTIONAL the SDK will need to be reset and re-initialized.

For the case of SDK_PIN_WITH_BIOMETRICS_OPTIONAL the app may either reset and re-initialize the SDK or re-activateBiometrics.

if any of the provided arguments are invalid.

FTApiPinIncorrectException

if using SDK_PIN_WITH_BIOMETRICS_OPTIONAL config and the PIN is missing or empty.

FTApiDeviceArchivedException

if using SDK_PIN_WITH_BIOMETRICS_OPTIONALconfig and the PIN verification has failed 5 times.

if the associated API to the Futurae backend calls fail.