Android Fingerprint Scanner Available

If a fingerprint scanner is available, the user can use the function of my applications by performing fingerprint authentication.

+5
source share
2 answers

Try this code:

FingerprintManager fingerprintManager = (FingerprintManager) context.getSystemService(Context.FINGERPRINT_SERVICE); if (!fingerprintManager.isHardwareDetected()) { // Device doesn't support fingerprint authentication } else if (!fingerprintManager.hasEnrolledFingerprints()) { // User hasn't enrolled any fingerprints to authenticate with } else { // Everything is ready for fingerprint authentication } 
+10
source

Try hasSystemFeature(PackageManager.FEATURE_FINGERPRINT) on the PackageManager instance (you can get it from calling getPackageManager() on any convenient Context ).

0
source

Source: https://habr.com/ru/post/1243118/


All Articles