switchToLockConfigurationBiometrics

public final Unit switchToLockConfigurationBiometrics(SDKConfiguration sdkConfiguration, FragmentActivity fragmentActivity, String promptTitle, String promptSubtitle, String promptDescription, String negativeButtonText, Callback<Unit> callback)

Protected operation to change SDK configuration without resetting. Requires at least one enrolled account. This method will attempt to authenticate the user.

There are two possible error types returned in the callback.

  • FTInvalidStateException:

  1. The function is called before launching the SDK.

  2. There are no enrolled accounts.

  3. Wrong switchToLockConfiguration* method is used for the provided SDKConfiguration.

  • LockException:

  1. LockMechanismUnavailableException - attempt to use BiometricsOnly with no biometrics enrolled on device

Parameters

sdkConfiguration

the new SDKConfiguration to apply. Must use LockConfigurationType.BIOMETRICS_ONLY

fragmentActivity

the FragmentActivity that will display the authentication prompt. Also used to get the application to re-launch the SDK

promptTitle

the title of the authentication prompt.

promptSubtitle

the subtitle of the authentication prompt.

promptDescription

the description of the authentication prompt.

negativeButtonText

the "close" button of the authentication prompt.

callback

to receive success or failure result of this operation.

Throws

if the biometric authentication failed.

if the SDK is locked.

if the provided SDKConfiguration is invalid. Please refer to the website guide to confirm your configuration is valid.

if sdkConfiguration uses setInvalidatedByBiometricChange(true) and no supported biometrics are available on the device, or LockConfigurationType.NONE is used.

if setInvalidatedByBiometricChange(false) with LockConfigurationType.BIOMETRICS_OR_DEVICE_CREDENTIALS and the device has no biometrics or lock credentials are available.

if there are no enrolled accounts.

if the SDK is not initialized.

if the SDK detects corrupted storage. This state requires the SDK to reset or to perform launchAccountRecovery

if the SDK cannot access necessary cryptographic material or perform cryptographic operations

if the API request fails. Refer to FTApiException subtypes for more specific errors.