2

Android 6.0 (M) offers new features Fingerprint Authentication. I tried this example android-FingerprintDialog it's good google sample.

A Problem is i am creating app like once user successfully authenticated by Fingerprint load that user data from SQlite Database but FingerprintManager can't provide any unique identity of fingerprint. If anyone have idea about this then please share it.

Mansukh Ahir
  • 3,373
  • 5
  • 40
  • 66
  • 1
    "but FingerprintManager can't provide any unique identity of fingerprint" -- AFAIK, the identity is that of the user of the device. If your app has the concept of multiple users on one device, you would have to handle that part separately (again, AFAIK). – CommonsWare Feb 06 '17 at 13:32
  • 1
    If you are using the Build.fingerpriont, it's a unique code – A P Feb 06 '17 at 13:35
  • @CommonsWare is there any way to access data from android via finger scanner? – Mansukh Ahir Feb 06 '17 at 13:42
  • I do not know what you mean, sorry. – CommonsWare Feb 06 '17 at 13:44
  • 1
    As per [the documentation](https://developer.android.com/about/versions/android-4.2.html#MultipleUsers): _Whenever your app saves user preferences, **creates a database**, or writes a file to the user’s internal or external storage space, that data is accessible only while running as that user._ So, even if you don't know the user's identity from the fingerprint, that should not matter to you. – Gergely Kőrössy Feb 06 '17 at 20:31
  • @GergelyKőrössy Thank you for answer but i want to avoid every time credential, allow users to access data via fingerprint authentication. like add attendance via fingerprint – Mansukh Ahir Feb 07 '17 at 05:58
  • 1
    @MansukhAhir You cannot do that. The fingerprints identify the current system user. Actually what happens is a verification, not an identification. The difference is that when the logged in user opens the application, the system already knows the exact set of fingerprints associated with the user, and only checks if the currently read one is one of them. Hence, it would make no sense to provide you the fingerprint's ID since all of them belong to the same user (i.e. the same person). The result of this is that you have no access to such data and you cannot do what you want to. Sorry. – Gergely Kőrössy Feb 07 '17 at 19:21
  • Thank you @GergelyKőrössy and all for share you answer. – Mansukh Ahir Feb 08 '17 at 06:05
  • hello @MansukhAhir bhai i have to do same multiple user functionality on single device so how can i detect unique data which can i get when detection of fingerprint and on bases of that data i need to fetch or write data in DB or Shared preference? – Vishal Patoliya ツ May 29 '17 at 07:32

2 Answers2

3

There is no way by which we identify that who has authenticated. In fact, the Android Compatibility Definition for Android 6.0 states in the Fingerprint section (7.3.10):

MUST NOT enable 3rd-party applications to distinguish between individual fingerprints.

Android Fingerprint method does not provide fingerprint name or Any unique identity. it treated each registered fingerprint equally and just authenticate only. (valid user or invalid user that's it)

Therefore while you could write an app that uses the fingerprint as a mechanism to authenticate the user, any registered fingerprint associated with the current user account could be used.

Storage The fingerprints are tied to the device (from the Nexus FAQ):

Your fingerprint data is stored securely and never leaves your device. Your data is not shared with Google or any apps on your device.

Therefore there is no way for an app to access the fingerprint data to be able to save it or use across the devices.

Suggestion : To distinguish multiple users or devices, you should use external fingureprint scanner. There's some external fingerprint scanners compatible with Android Platform and with SDK for Android. These SDKs allow to enroll and verify multiple users.

Rakesh Soni
  • 10,135
  • 5
  • 44
  • 51
2

You can't get fingerprint template or image from android Fingerprint API. Fingerprint data are stored in a secure place by android system and are not accessible even in rooted devices.

Leave the part of verification with api android itself.

rohitanand
  • 710
  • 1
  • 4
  • 26