I am using Fingerprint authentication in my app. To decide whether a device has a fingerprint hardware or not I am using this
getPackageManager().hasSystemFeature(PackageManager.FEATURE_FINGERPRINT);
in the official document it is mentioned that it was added in API 23.
What is working
This API is working fine for all the API 24 and above. (I have tested on 24, 26 and 30)
What is not working
It returns false always even the device has fingerprint hardware available.
My questions are
- It it a bug?
- Am I missing something? Does my understanding of hasSystemFeature() is incorrect ?
- What is a more reliable way to check ?
I found a very interesting answer here which says that it can return false even if device has fingerprint hardware because the feature may not be specified in config file. I don't know how credible that it.