What you're asking for isn't possible, at least not using Android's Fingerprint API. The FingerprintManager
class acts as a way of accessing previously-stored fingerprints within the Android keystore system
User authentication authorizes a specific cryptographic operation associated with one key. In this mode, each operation involving such a key must be individually authorized by the user. Currently, the only means of such authorization is fingerprint authentication: FingerprintManager.authenticate
. Such keys can only be generated or imported if at least one fingerprint is enrolled (see FingerprintManager.hasEnrolledFingerprints
). These keys become permanently invalidated once a new fingerprint is enrolled or all fingerprints are unenrolled.
The FingerprintManager
class itself only has one authentication method, authenticate()
, which determined if the scanned fingerprint is known to the device. In API 28 this is deprecated in favour of BiometricPrompt
, which does pretty much the same job.
So in short, no. You'd need to use an exteral fingerprint scanner and roll your own solution based on the functionality the external hardware provides.
EDIT As an alternative option, you can detect swipes on the Fingerprint Sensor using FingerprintGestureController
, but again, this doesn't detect which finger is being used on the sensor.