AuthenticationRequest.Biometric.Builder
public final class AuthenticationRequest.Biometric.Builder
Builder used to create an instance of Biometric.
Note for Kotlin users: Prefer using the AuthenticationRequest.biometricRequest function to construct Biometric instances.
| Throws | |
|---|---|
IllegalArgumentException |
if more than one Compatibility Note: Prior to |
Summary
Public constructors |
|---|
Builder( |
Public methods |
|
|---|---|
final @NonNull AuthenticationRequest.Biometric |
build()Construct an instance of |
final @NonNull AuthenticationRequest.Biometric.Builder |
The optional |
final @NonNull AuthenticationRequest.Biometric.Builder |
setIsConfirmationRequired(boolean isConfirmationRequired)Whether user confirmation should be required for passive biometrics. |
final @NonNull AuthenticationRequest.Biometric.Builder |
@RequiresPermission(value = "android.permission.SET_BIOMETRIC_DIALOG_ADVANCED")The optional bitmap drawable of the logo that will be shown on the prompt. |
final @NonNull AuthenticationRequest.Biometric.Builder |
@RequiresPermission(value = "android.permission.SET_BIOMETRIC_DIALOG_ADVANCED")The optional logo description text that will be shown on the prompt. |
final @NonNull AuthenticationRequest.Biometric.Builder |
@RequiresPermission(value = "android.permission.SET_BIOMETRIC_DIALOG_ADVANCED")The optional drawable resource of the logo that will be shown on the prompt. |
final @NonNull AuthenticationRequest.Biometric.Builder |
setMinStrength(The minimum biometric strength for the authentication. |
final @NonNull AuthenticationRequest.Biometric.Builder |
setSubtitle(String subtitle)The optional subtitle of the prompt. |
Public constructors
Builder
public Builder(
@NonNull String title,
@NonNull AuthenticationRequest.Biometric.Fallback... authFallbacks
)
| Parameters | |
|---|---|
@NonNull String title |
The title of the prompt. |
@NonNull AuthenticationRequest.Biometric.Fallback... authFallbacks |
A list of |
Public methods
build
public final @NonNull AuthenticationRequest.Biometric build()
Construct an instance of Biometric.
setContent
public final @NonNull AuthenticationRequest.Biometric.Builder setContent(AuthenticationRequest.BodyContent content)
The optional AuthenticationRequest.BodyContent of the prompt.
setIsConfirmationRequired
public final @NonNull AuthenticationRequest.Biometric.Builder setIsConfirmationRequired(boolean isConfirmationRequired)
Whether user confirmation should be required for passive biometrics.
setLogoBitmap
@RequiresPermission(value = "android.permission.SET_BIOMETRIC_DIALOG_ADVANCED")
public final @NonNull AuthenticationRequest.Biometric.Builder setLogoBitmap(Bitmap logoBitmap)
The optional bitmap drawable of the logo that will be shown on the prompt. Note that using this method is not recommended in most scenarios because the calling application's icon will be used by default. Setting the logo is intended for large bundled applications that perform a wide range of functions and need to show distinct icons for each function. This requires SET_BIOMETRIC_DIALOG_ADVANCED permission.
setLogoDescription
@RequiresPermission(value = "android.permission.SET_BIOMETRIC_DIALOG_ADVANCED")
public final @NonNull AuthenticationRequest.Biometric.Builder setLogoDescription(String logoDescription)
The optional logo description text that will be shown on the prompt. Note that using this method is not recommended in most scenarios because the calling application's name will be used by default. Setting the logo description is intended for large bundled applications that perform a wide range of functions and need to show distinct description for each function. This requires SET_BIOMETRIC_DIALOG_ADVANCED permission.
setLogoRes
@RequiresPermission(value = "android.permission.SET_BIOMETRIC_DIALOG_ADVANCED")
public final @NonNull AuthenticationRequest.Biometric.Builder setLogoRes(@DrawableRes int logoRes)
The optional drawable resource of the logo that will be shown on the prompt. Note that using this method is not recommended in most scenarios because the calling application's icon will be used by default. Setting the logo is intended for large bundled applications that perform a wide range of functions and need to show distinct icons for each function. This requires SET_BIOMETRIC_DIALOG_ADVANCED permission.
setMinStrength
public final @NonNull AuthenticationRequest.Biometric.Builder setMinStrength(
@NonNull AuthenticationRequest.Biometric.Strength minStrength
)
The minimum biometric strength for the authentication. Note that Class 3 biometrics are guaranteed to meet the requirements for Class 2 and thus will also be accepted.
setSubtitle
public final @NonNull AuthenticationRequest.Biometric.Builder setSubtitle(String subtitle)
The optional subtitle of the prompt.