BiometricPromptData.Builder


class BiometricPromptData.Builder


Builder for constructing an instance of BiometricPromptData

Summary

Public constructors

Public functions

BiometricPromptData

Builds the BiometricPromptData instance.

BiometricPromptData.Builder
setAllowedAuthenticators(allowedAuthenticators: Int)

Specifies the type(s) of authenticators that may be invoked to authenticate the user.

BiometricPromptData.Builder

Sets whether this BiometricPromptData should have a crypto object associated with this authentication.

Public constructors

Builder

Added in 1.5.0-beta01
Builder()

Public functions

build

Added in 1.5.0-beta01
fun build(): BiometricPromptData

Builds the BiometricPromptData instance.

setAllowedAuthenticators

Added in 1.5.0-beta01
fun setAllowedAuthenticators(allowedAuthenticators: Int): BiometricPromptData.Builder

Specifies the type(s) of authenticators that may be invoked to authenticate the user. Available authenticator types are defined in Authenticators and can be combined via bitwise OR. Defaults to BIOMETRIC_WEAK.

If this method is used and no authenticator of any of the specified types is available at the time an error code will be supplied as part of android.content.Intent that will be launched by the containing CredentialEntry or CreateEntry's corresponding android.app.PendingIntent.

Parameters
allowedAuthenticators: Int

A bit field representing all valid authenticator types that may be invoked by the Credential Manager selector.

setCryptoObject

Added in 1.5.0-beta01
fun setCryptoObject(cryptoObject: BiometricPrompt.CryptoObject?): BiometricPromptData.Builder

Sets whether this BiometricPromptData should have a crypto object associated with this authentication. If opting to pass in a value, the allowedAuthenticators must be BIOMETRIC_STRONG. The CryptoObject does not presently support presentationSession and operationHandle constructors and intends to support the CryptoObject built from the stable biometric jetpack library described here.

Parameters
cryptoObject: BiometricPrompt.CryptoObject?

the CryptoObject to be associated with this biometric authentication flow