This quiz will test your understanding of implementing biometric authentication in Android applications. It covers key concepts such as the roles of BiometricManager and BiometricPrompt, the process of setting up and using fingerprint or face authentication, and the steps involved in configuring an Android project to support these features. By answering these questions, you’ll be able to gauge your knowledge of how to integrate biometric authentication into your apps, manage user interactions, and ensure a secure authentication flow.
1.
Which biometric permission is required in the AndroidManifest.xml file to support both fingerprint and face authentication?
2.
Why is the mainExecutor used when creating a BiometricPrompt instance?
3.
What does the BiometricPrompt class do?
4.
How is the initial fingerprint data enrolled on a physical Android device?
5.
What is the purpose of the setNegativeButtonText() method in the BiometricPrompt.Builder?
6.
In the context of biometric authentication, what is a 'singleton' object in Kotlin?
7.
What role does BiometricPrompt.AuthenticationCallback play in biometric authentication?
8.
What is required to initiate fingerprint authentication on a device?
9.
Why is the BiometricPrompt.authenticate() method called?
10.
What is the role of the BiometricPrompt.PromptInfo.Builder class?
11.
Which method in BiometricPrompt is used to handle errors during authentication?
12.
What is the primary purpose of the BiometricManager class in Android biometric authentication?
13.
What happens when too many failed biometric authentication attempts occur?
14.
Why is the biometric prompt dialog necessary in the authentication process?
15.
Which Android API level is required as a minimum for the BiometricDemo project?
16.
Why is it necessary to use FragmentActivity instead of ComponentActivity when working with BiometricPrompt in Jetpack Compose?
17.
Why is it important to check if the device supports biometric authentication before initiating the process?
18.
Which method is used to check if biometric authentication is available and enabled on a device?