How to Identify Fingerprint is add/edit/deleted from the android device

五迷三道 提交于 2020-05-28 04:38:07

问题


I am working on the fingerprint authentication for android app. In which I have done with the authentication related part. Now I am doing the research to identify weather the user has added a new fingerprint, edit or delete the fingerprint from the device. But i didn't find any resource which helps me to identify this.

So, if anyone can help me how to identify this, it will be very helpful to me.


回答1:


KeyPermanentlyInvalidatedException would be thrown when the SecretKey is used, if a new fingerprint is added or all the fingerprints are removed after the key was created. But from what I've seen, only a bunch of Samsung devices actually throw this exception. So it probably is not reliable enough if you want to know any change in the enrolled fingerprints across all devices.

If you're concerned about the security side of things, check out the setInvalidatedByBiometricEnrollment method which is available on N and above.




回答2:


https://developer.android.com/reference/android/security/keystore/KeyGenParameterSpec.Builder.html#setInvalidatedByBiometricEnrollment(boolean)

https://android.googlesource.com/platform/frameworks/base/+/7ea5090/keystore/java/android/security/KeyPermanentlyInvalidatedException.java

Refer This Links. from what I've seen, only a bunch of Samsung devices actually throw this exception. So it probably is not reliable enough if you want to know any change in the enrolled fingerprints across all devices.



来源:https://stackoverflow.com/questions/41996310/how-to-identify-fingerprint-is-add-edit-deleted-from-the-android-device

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