· Only EMUI 4 (API level 23) and later versions support fingerprint authentication. In addition, the device hardware must support fingerprint authentication.
· When you create PromptInfo using PromptInfo.Builder, you can only select either setDeviceCredentialAllowed(true) or setNegativeButtonText(). setDeviceCredentialAllowed(true) allows change from fingerprint authentication to another authentication mode, for example, lock screen password authentication.
· When using BioAuthnPrompt.PromptInfo.Builder.setDeviceCredentialAllowed(true), pay attention to the following:
1. This function does not support devices with in-screen fingerprint sensors and running EMUI 9.x, for example, Mate 20 Pro, P30, P30 Pro, and Magic 2. If the function is used on these devices, the authentication will fail immediately when users change the authentication mode to lock screen password authentication.
2. In EMUI 9.x or earlier, fingerprint authentication may work once only. You can solve this problem in one of the following ways:
1) Do not create the BioAuthnPrompt object for the activity repeatedly.
2) After the authentication is complete, call the Activity.recreate() method to recreate the UI.
3) Close the activity and open it again.