7

I want to make an android application, which registers user fingerprint (from device's fingerprint scanner) and stores it in a data structure or in key store provider, next time user put his fingerprint scanner, he should be authenticated from the fingerprints stored in the data structure or from the android keystore provider. If anyone can help me how to approach for this. Thanks in advance.

Rohit Saroha
  • 73
  • 1
  • 7

3 Answers3

0

Sorry but as far as I know, no way to register fingerprint. User should register his/her finger in settings. You can just check user fingerprint for Authentication. If there is no registered finger or has no fingerprint sensor, easily toast it.

//Check whether the device has a fingerprint sensor//
        if (!mFingerprintManager.isHardwareDetected()) {
            // If a fingerprint sensor isn’t available, then inform the user that they’ll be unable to use your app’s fingerprint functionality//
            textView.setText("Your device doesn't support fingerprint authentication");
        }
        //Check whether the user has granted your app the USE_FINGERPRINT permission//
        if (ActivityCompat.checkSelfPermission(this, Manifest.permission.USE_FINGERPRINT) != PackageManager.PERMISSION_GRANTED) {
            // If your app doesn't have this permission, then display the following text//
            Toast.makeText(EnterPinActivity.this, "Please enable the fingerprint permission", Toast.LENGTH_LONG).show();
        }

        //Check that the user has registered at least one fingerprint//
        if (!mFingerprintManager.hasEnrolledFingerprints()) {
            // If the user hasn’t configured any fingerprints, then display the following message//
            Toast.makeText(EnterPinActivity.this, "No fingerprint configured. Please register at least one fingerprint in your device's Settings", Toast.LENGTH_LONG).show();
        }

        //Check that the lockscreen is secured//
        if (!mKeyguardManager.isKeyguardSecure()) {
            // If the user hasn’t secured their lockscreen with a PIN password or pattern, then display the following text//
            Toast.makeText(EnterPinActivity.this, "Please enable lockscreen security in your device's Settings", Toast.LENGTH_LONG).show();
        }

Check this tutorials to understand how check user fingerprint:

Link1 Link2

  • I want my application to have an activity which registers users fingerprint and stores it in database and another activity in which registered users can be authenticated using my database not from the system one, (In settings I can only register limited number of users) – Rohit Saroha Jul 24 '17 at 15:12
  • @RohitSaroha I understand but it is not possible, check my edited answer. – Amirhossein Naghshzan Jul 25 '17 at 06:11
  • how can you say it is not possible? – Rohit Saroha Jul 25 '17 at 16:36
  • 5
    @RohitSaroha it is not posisble i have implemented touch login in my application .. why its not possible coz on Authentication Succuess you get FingerprintManager.AuthenticationResult object containing a cipher object as a member variable which have different signature value of each finger and it return diferent value for the same finger as well.. plus give some respect to the person helping you out here, this is rude to say "how can you say it is not possible".. have happy coding – Adeel Turk May 15 '18 at 10:38
0

There is no way to register fingerprint and can't access to fingerprint data because stored in android secure place

Moeen Kashisaz
  • 302
  • 1
  • 2
  • 12
0

You can retrieve Fingerprint Ids from android after registration.

So you can utilize settings activity from android to register and match the fingerprint IDs from there With individuals, That way, you can use that for identification and verification.

Regards.

Douglas T
  • 1
  • 1
  • 1