promptInfo
Configures the biometric authentication prompt UI appearance and behavior.
This method allows customization of the biometric prompt that is displayed to users during authentication. The configuration includes text content, button labels, and authentication behavior settings that control the user experience.
Available prompt configurations:
Title: Main heading displayed in the prompt
Subtitle: Secondary text providing additional context
Description: Detailed explanation of the authentication purpose
Negative Button: Cancel button text and behavior
Device Credential: Whether to allow device PIN/pattern/password fallback
Confirmation Required: Whether explicit confirmation is needed after biometric recognition
UI design principles:
Use clear, concise language that explains the authentication purpose
Maintain consistency with application branding and terminology
Provide meaningful cancel options for user control
Consider accessibility and localization requirements
Example configurations:
// Basic fingerprint authentication
promptInfo {
setTitle("Unlock with Fingerprint")
setSubtitle("Touch the fingerprint sensor")
setNegativeButtonText("Cancel")
}
// High-security authentication with confirmation
promptInfo {
setTitle("Secure Transaction")
setSubtitle("Authenticate to authorize payment")
setDescription("Your biometric confirms this $${amount} transaction")
setConfirmationRequired(true)
setNegativeButtonText("Cancel Payment")
}
// Multi-modal biometric authentication
promptInfo {
setTitle("Access Secure Data")
setSubtitle("Use fingerprint, face, or iris")
setDescription("Multiple biometric options are available")
setAllowedAuthenticators(BIOMETRIC_WEAK or BIOMETRIC_STRONG)
}Localization considerations:
All text should support internationalization
Consider text length variations across languages
Maintain consistent terminology with OS biometric settings
Parameters
Configuration lambda applied to BiometricPrompt.PromptInfo.Builder