-->

Is it doable to collect user fingerprint with andr

2019-03-01 06:00发布

问题:

Is it doable to collect user fingerprint with android? Our backend system has a fingerprint database. We'd like to match the fingerprints collected against database to see if there is a match.

回答1:

If by "collect user fingerprint" you mean getting an image of the fingerprint in some form, then no, you can't.

Android's fingerprint API essentially works like this:

  1. The user enrolls a fingerprint in the Android Settings app.

  2. Your app creates a cryptographic key that it associates with the user, and a CryptoObject based on that key, and starts a fingerprint authentication.

  3. If the fingerprint read by the sensor matches any of the enrolled fingerprints, the authentication is successful and the CryptoObject can be used to perform a cryptographic operation (such as encrypting/decrypting some data).

At no point is the actual fingerprint available to your app, to any other app, or even to the OS.

From Google's fingerprint implementation guidelines to manufacturers:

Raw fingerprint data or derivatives (e.g. templates) must never be accessible from outside the sensor driver or Trusted Execution Environment (TEE).



回答2:

I haven't tried this yet, but recent Android OS (Marshmallow) has ability to do that.

"To authenticate users via fingerprint scan, get an instance of the new FingerprintManager class and call the authenticate() method. Your app must be running on a compatible device with a fingerprint sensor. You must implement the user interface for the fingerprint authentication flow on your app, and use the standard Android fingerprint icon in your UI. The Android fingerprint icon (c_fp_40px.png) is included in the Fingerprint Dialog sample. If you are developing multiple apps that use fingerprint authentication, note that each app must authenticate the user’s fingerprint independently. "

https://developer.android.com/about/versions/marshmallow/android-6.0.html

Two restrictions:

  1. Android 6.0 and higher
  2. Fingerprint sensor inside device

Up to date market share of Android 6.0 you can find here:

https://developer.android.com/about/dashboards/index.html