I am very interested in learning how to develop an android application which uses fingerprint authentication.
How can i implement that Fingerprint authentication?
Fingerprint Authentication is what you want:
This release offers new APIs to let you authenticate users by using their fingerprint scans on supported devices, Use these APIs in conjunction with the Android Keystore system.
To authenticate users via fingerprint scan, get an instance of the new FingerprintManager class and call the authenticate() method. Your app must be running on a compatible device with a fingerprint sensor. You must implement the user interface for the fingerprint authentication flow on your app, and use the standard Android fingerprint icon in your UI. The Android fingerprint icon (c_fp_40px.png) is included in the Fingerprint Dialog sample. If you are developing multiple apps that use fingerprint authentication, note that each app must authenticate the user’s fingerprint independently.
To use this feature in your app, first add the USE_FINGERPRINT permission in your manifest.
<uses-permission
android:name="android.permission.USE_FINGERPRINT" />
To see an app implementation of fingerprint authentication, refer to the Fingerprint Dialog sample. For a demonstration of how you can use these authentication APIs in conjunction with other Android APIs, see the video Fingerprint and Payment APIs.
I made a short library for this if you want to take a look at it. Here is how to use it :
<uses-permission android:name="android.permission.USE_FINGERPRINT"/>
...
FingerprintDialog dialog = new FingerprintDialog(Context);
dialog.show(R.string.title, R.string.message, new FingerprintCallback() {
@Override
public void onFingerprintSuccess() {}
@Override
public void onFingerprintCancel() {}
});
There is the result :
Github link : https://github.com/omaflak/FingerprintDialog
The Xamarin Documentation Says
The FingerprintManager (and its Support Library counterpart, FingerprintManagerCompat) is the primary class for using the fingerprint scanning hardware. This class is an Android SDK wrapper around the system level service that manages interactions with the hardware itself. It is responsible for starting the fingerprint scanner and for responding to feedback from the scanner. This class has a fairly straightforward interface with only three members:
Authenticate – This method will initialize the hardware scanner and start the service in the background, waiting for the user to scan their fingerprint.
EnrolledFingerprints – This property will return true if the user has registered one or more fingerprints with the device.
HardwareDetected – This property is used to determine if the device supports fingerprint scanning. The FingerprintManager.Authenticate method is used by an Android application to start the fingerprint scanner. The following snippet is an example of how to invoke it using the Support Library compatibility APIs:
//context is any Android.Content.Context instance, typically the Activity
FingerprintManagerCompat fingerprintManager = FingerprintManagerCompat.From(context);
fingerprintManager.Authenticate(FingerprintManager.CryptoObject crypto,
int flags,
CancellationSignal cancel,
FingerprintManagerCompat.AuthenticationCallback callback,
Handler handler
);
Please See These Developer Resources:
https://developer.android.com/reference/android/hardware/fingerprint/FingerprintManager.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With