switchToLockConfigurationBiometricsOrCredentials

public final Unit switchToLockConfigurationBiometricsOrCredentials(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.

  • IllegalStateException:

  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. LockInvalidConfigurationException - invalidatedByBiometricChange flag is used LockConfigurationType.NONE

  2. LockMechanismUnavailableException - lock screen is not set and biometrics not enrolled on this device.

Parameters

sdkConfiguration

the new SDKConfiguration to apply. Must use LockConfigurationType.BIOMETRICS_OR_DEVICE_CREDENTIALS

fragmentActivity

the FragmentActivity that will display the authentication prompt. Also usedto 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.