Is there any way that we can get idea about the Finger details of Fingerprint authentication?

此生再无相见时 提交于 2021-02-05 12:29:37

问题


I am developing one application, in that application i want to add some restriction based on Finger print login.

Let's assume i have added two Fingerprint in my device.

1) Left hand index finger 
2) Right hand index finger

Is there any way so i can get idea about which finger has been used for the authentication, i mean to say i am logged in my app using left index finger or right index finger.

FingerprintManager.AuthenticationResult


回答1:


Is there any way so i can get idea about which finger has been used for the authentication

No, sorry.




回答2:


sorry, you can't register fingerprint or access the data but only can check the enrollment with code below

//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();
    }


来源:https://stackoverflow.com/questions/53139490/is-there-any-way-that-we-can-get-idea-about-the-finger-details-of-fingerprint-au

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!