BiometricPromptData.Builder
public final class BiometricPromptData.Builder
Builder for constructing an instance of BiometricPromptData
Summary
Public constructors |
|---|
Builder() |
Public methods |
|
|---|---|
final @NonNull BiometricPromptData |
build()Builds the |
final @NonNull BiometricPromptData.Builder |
setAllowedAuthenticators(int allowedAuthenticators)Specifies the type(s) of authenticators that may be invoked to authenticate the user. |
final @NonNull BiometricPromptData.Builder |
setCryptoObject(BiometricPrompt.CryptoObject cryptoObject)Sets whether this |
Public methods
build
public final @NonNull BiometricPromptData build()
Builds the BiometricPromptData instance.
| Throws | |
|---|---|
IllegalArgumentException |
If |
setAllowedAuthenticators
public final @NonNull BiometricPromptData.Builder setAllowedAuthenticators(int allowedAuthenticators)
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 | |
|---|---|
int allowedAuthenticators |
A bit field representing all valid authenticator types that may be invoked by the Credential Manager selector. |
setCryptoObject
public final @NonNull BiometricPromptData.Builder setCryptoObject(BiometricPrompt.CryptoObject cryptoObject)
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 | |
|---|---|
BiometricPrompt.CryptoObject cryptoObject |
the |