Here is what i am really stuck at.. Everywhere that i searched i found out about the Google sign-in and passwords and various stuff but all i want is a simple activity where the user puts the finger on the fingerprint sensor, it checks whether it matches the one that is stored or not and then moves on to the next function. But i cant find it anywhere so can anybody help me ?
Here is the code that i wrote till now for checking whether the phone supports fingerprint or not :
@SuppressLint("NewApi") private boolean testFingerPrintSettings() {
print("Testing Fingerprint Settings");
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M)
{
print("This Android version does not support fingerprint authentication.");
return false;
}
keyguardManager = (KeyguardManager) getSystemService(KEYGUARD_SERVICE);
fingerprintManager = (FingerprintManager) getSystemService(FINGERPRINT_SERVICE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
if (!keyguardManager.isKeyguardSecure()) {
print("User hasn't enabled Lock Screen");
return false;
}
}
if (ActivityCompat.checkSelfPermission(this,Manifest.permission.USE_FINGERPRINT) != PackageManager.PERMISSION_GRANTED) {
print("User hasn't granted permission to use Fingerprint");
return false;
}
if (!fingerprintManager.hasEnrolledFingerprints()) {
print("User hasn't registered any fingerprints");
return false;
}
print("Fingerprint authentication is set.\n");
return true;
}
All checked and done, all i need now is a floating activity that checks whether the fingerprint stored is the same as the fingerprint input by the user