Is there a way we can find the number of available

2019-06-10 05:13发布

Is it possible to retrieve the number of available fingerprints in an Android device.

I want to do some functionality when number of fingerprints changes in the device.

For that I have to retrieve the number of fingerprints in the device first.

Can anyone suggest how to do that.

1条回答
你好瞎i
2楼-- · 2019-06-10 05:42

On devices with a fingerprint sensor, users can enroll one or more fingerprints and use those fingerprints to unlock the device and perform other tasks. Android uses the Fingerprint Hardware Abstraction Layer (HAL) to connect to a vendor-specific library and fingerprint hardware, e.g. a fingerprint sensor. There is a method enumerate(Synchronous call for enumerating all known fingerprint templates) There is also Android's FingerprintManager. But it has a method hasEnrolledFingerprints which returns true if there is more than one fingerprint enrolled.So you won't know how many or if there was any added.

Useful links to the docs HAL

FingerprintManager

查看更多
登录 后发表回答