pawarrohit14
pawarrohit14

Reputation: 497

How to check if a new fingerprint has been added to device?

I am using FingerprintManager to implement fingerprint authentication in my app. It works fine but How to check if a new fingerprint has been added to device ? so that I can invalidate that (new) fingerprint authentication in my app.

Upvotes: 0

Views: 2506

Answers (1)

dipdipdip
dipdipdip

Reputation: 2556

As far as I know there is no API to detect a new Fingerprint. You should try to initialize your Cipher object for decryption (Cipher.DECRYPT_MODE). If it fails for whatever reason you can invalidate your key/stored data. If i remember correctly it should throw an InvalidKeyException after adding a new Finger. However there are other reasons this Exception is thrown.

Keep in mind that this behavior might not occur on an Emulator. The keys don't get invalided. Not even after removing every Finger and readding them.

Upvotes: 1

Related Questions