Biometric prompt not displayed on Android 6

限于喜欢 提交于 2020-01-23 10:32:28

问题


I am trying to use BiometricPrompt to use fingerprint sensor for authentication. My minimum supported sdk is 23 (Android M).

It works on all android version I tested except for marshmallow.

In marshmallow when I try to use authenticate method on button click it calls onAuthenticationError method from BiometricPrompt.AuthenticationCallback and it gives error code ERROR_HW_NOT_PRESENT and error messsage:

This device does not have a fingerprint sensor

even when device have fingerprint sensor and it also has one or more fingerprint added to it.

I have added permission/feature in AndroidManifest.xml.

I am using jetpack library for above this.

implementation 'androidx.biometric:biometric:1.0.0-alpha04'


回答1:


This has been resolved in beta01, this bug to be exact:

Fixed inconsistent behavior on API Levels 23 to 27. (b/124066957)


来源:https://stackoverflow.com/questions/56545145/biometric-prompt-not-displayed-on-android-6

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!