Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android fingerprint detect new finger added

How to detect if the user add new fingerprint to Android settings after he/she authenticate finger inside my application ?

i.e. iOS have something called (evaluatedPolicyDomainState) to detect changes in fingerprint catalog what is the alternative in Android ?

This require for security reasons to prompt password in this case

like image 594
Sameer Avatar asked Jun 13 '17 08:06

Sameer


People also ask

How do I add another fingerprint to my Android?

Add additional fingerprintsFrom Settings, tap Biometrics and security, and then tap Fingerprints. Enter your secure screen lock credentials and then tap Add fingerprint. Follow the on-screen prompts to add the fingerprint, and then tap Done.

Where are Android fingerprints stored?

Your fingerprint data is stored in a Trusted Execution Environment (TEE) – a separate and isolated area in the phone's hardware. According to Android Central, “a TEE might use its own processor and memory or it can use a virtualized instance on the main CPU.

What do you do when your fingerprints Cannot be read?

Rubbing your finger on your forehead before placing it on the reader sometimes helps. If this does not help, try registering your fingerprint again. Do not use hand sanitizer or wash your hands just prior to using the fingerprint reader.


1 Answers

From the documentation for setUserAuthenticationRequired:

The key will become irreversibly invalidated once the secure lock screen is disabled (reconfigured to None, Swipe or other mode which does not authenticate the user) or when the secure lock screen is forcibly reset (e.g., by a Device Administrator). Additionally, if the key requires that user authentication takes place for every use of the key, it is also irreversibly invalidated once a new fingerprint is enrolled or once no more fingerprints are enrolled, unless setInvalidatedByBiometricEnrollment(boolean) is used to allow validity after enrollment. Attempts to initialize cryptographic operations using such keys will throw KeyPermanentlyInvalidatedException.

So to check if any new fingerprints have been enrolled since you created your fingerprint-associated key, just create a cipher with that key and try to init the cipher. If any new fingerprints have been enrolled, the init call should trigger a KeyPermanentlyInvalidatedException.

like image 73
Michael Avatar answered Sep 27 '22 19:09

Michael