0

I understand how to authenticate users via Fingerprint Authentication using Android SDK. But it only tells if the fingerprint matches one of the enrolled fingerprints or not - i.e. a boolean.

I want to make it so that it gives me the fingerprint image as well, so I can extract the information against that fingerprint, i.e. userId, name, etc stored in the database.

For example: I have 3 users: Admin, Teacher, Student. I should be able to use the built-in fingerprint reader to be able to determine if the user is identified as an Admin, Teacher or Student, and give the app access rights accordingly.

The app will be deployed to only ONE device that is accessible to all users, so the application should be responsible to control the limit of number of fingerprints that can be registered.

Is it possible with the built-in fingerprint reader of the device?

sga4
  • 350
  • 4
  • 15
  • If you intend to verify the users with the CryptoObjects that a fingerprint authentication unlocks, keep in mind that prior to API level 24 enrolling additional fingerprints would permanently invalidate any existing fingerprint-associated keys. Starting with API level 24 you can control whether existing keys should be invalidated or not. Enrolling all 3 fingerprints _before_ you create the keys should also work. – Michael Jul 10 '17 at 07:51

1 Answers1

0

I want to make it so that it gives me the fingerprint image as well

That is not supported by Android's fingerprint APIs, for privacy reasons.

I should be able to use the built-in fingerprint reader to be able to determine if the user is identified as an Admin, Teacher or Student, and give the app access rights accordingly.

Each of those individuals should have a separate device account. Then each of them has a separate copy of your app, in effect. So long as each of those accounts get configured in your app with the proper role, the identification process is handled for you by the OS.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Can you please elaborate on Privacy reasons please? I can do that using an external fingerprint reader attached via usb. Why should the built-in reader have privacy issues to limit its capabilities? – sga4 Jul 09 '17 at 18:45
  • The app will not be a "Playstore" app. It will not be distributed. We are developing it just for a SINGLE device, and that device will be used by all kinds of users with different access rights to the app. So, in effect, all users will share the same copy of the app. – sga4 Jul 09 '17 at 18:47
  • @sga4: "Can you please elaborate on Privacy reasons please?" -- you are welcome to take that up with Google. They decided (as Apple did, AFAIK), to have all fingerprint information managed in cryptographic hardware. "I can do that using an external fingerprint reader attached via usb" -- then use that. Or, give each of those individuals a separate device account, as I suggested in my answer. – CommonsWare Jul 09 '17 at 18:56
  • " give each of those individuals a separate device account" that seems to be my best option yet. Thanks – sga4 Jul 09 '17 at 19:04