Reputation: 3236
I'm not sure if this is the right place to ask for flow-related question. Do guide me if you're aware of a better section.
I'm currently doing a web based system for multiple organizations, so on my login form, there's 3 simple field:
Now we are actually studying on the fingerprint authentication technology, on how it could help above.
Our assumption is below:
But from what we studied, it seems that the fingerprint SDK doesn't works this way, it simply authenticate if the user is the owner of the phone, and it does not provide us a code or something to represents the fingerprint.
Can anyone with experience in developing a working/deployed fingerprint app, share with me how does fingerprint helps in authenticating your user?
Thank you.
Upvotes: 0
Views: 81
Reputation: 1047
you should add this line in your manifest.xml - <uses-feature
android:name="android.hardware.fingerprint"
android:required="false" />
Here is the code sample to show fingerprint dialog and get result from user interaction:
private void showFingerPrintDialog() {
final FingerprintDialogBuilder dialogBuilder = new FingerprintDialogBuilder(ContextInstance)
.setTitle(R.string.fingerprint_dialog_title)
.setSubtitle(R.string.fingerprint_dialog_subtitle)
.setDescription(R.string.fingerprint_dialog_description)
.setNegativeButton(R.string.cancel);
dialogBuilder.show(getSupportFragmentManager(), new AuthenticationCallback() {
@Override
public void fingerprintAuthenticationNotSupported() {
Log.d(TAG, "fingerprintAuthenticationNotSupported: ");
}
@Override
public void hasNoFingerprintEnrolled() {
Log.d(TAG, "hasNoFingerprintEnrolled: ");
}
@Override
public void onAuthenticationError(int errorCode, @Nullable CharSequence errString) {
Log.d(TAG, "onAuthenticationError: ");
}
@Override
public void onAuthenticationHelp(int helpCode, @Nullable CharSequence helpString) {
Log.d(TAG, "onAuthenticationHelp: ");
}
@Override
public void authenticationCanceledByUser() {
Log.d(TAG, "authenticationCanceledByUser: ");
}
@Override
public void onAuthenticationSucceeded() {
Log.d(TAG, "onAuthenticationSucceeded: ");
/*SaveResult in db or preference*/
}
@Override
public void onAuthenticationFailed() {
Log.d(TAG, "onAuthenticationFailed: ");
}
});
}
Upvotes: 1