Biometric authentication implementation

10498
0

BiometricPrompt provides secure authentication via fingerprint, face, or iris. I create BiometricPrompt with callback handling success, error, and failure. PromptInfo configures title, subtitle, description, and allowed authenticators. Negative button text or setDeviceCredentialAllowed enables PIN/pattern fallback. CryptoObject secures operations with authenticated keys. Authentication types—BIOMETRICSTRONG, BIOMETRICWEAK, DEVICE_CREDENTIAL—define security levels. Error codes indicate why authentication failed. The API works across Android versions with androidx.biometric library. Biometric auth protects sensitive operations—payments, data access, logins. It provides convenient security without passwords, respecting user privacy and hardware capabilities.