Fingerprint plugin 1.3.0 for Xamarin released

The fingerprint plugin now supports Samsung devices

Posted by Sven-Michael Stübe on October 13, 2016

I recently pushed the stable version 1.3.0 of my fingerprint plugin for xamarin to NuGet. The code is available on github.

If you want to try it you have two options. You can simply clone the repository and build and execute the sample applications, or integrate it directly into your own app via NuGet NuGet NuGet MvvmCross.

Changes

Breaking

The property IsAvailable got replaced with GetAvailabilityAsync() which gives you a more detailed feedback why the fingerprint authentication is not available if it isn’t available. The possible options are:

  • Available: Fingerprint authentication can be used.
  • NoImplementation: This plugin has no implementation for the current platform.
  • NoApi: Operating system has no supported fingerprint API.
  • NoPermission: App is not allowed to access the fingerprint sensor.
  • NoSensor: Device has no fingerprint sensor.
  • NoFingerprint: Fingerprint isn’t set up.
  • Unknown: An unknown, platform specific error occurred.

If you are not interested in the reason, you can easily check the availability via IsAvailableAsync().

Samsung Support

Samsung devices (even > Android 6.0) are using a own API for fingerprint authentication called Samsung Pass. The plugin supports it now. Authentication on pre Marshmallow Devices is possible, now. The used pass SDK version is 1.2.0, because 1.2.1 wasn’t working on a Lollipop device. If you are interested how I bound the obfuscated library, have a look at Samsung Binding. Tweet me if you have some better ideas.

Animations

The built in Authentication dialog on Android gives animated feedback to the user. The following example shows a failed attempt followed by requesting the fallback.

Localization

The reason text and button labels are now fully customizable. But there are some platform specific limitations.

var dialogConfig = new AuthenticationRequestConfiguration("Beweise, dass du Finger hast!")
{
    CancelTitle = "Abbrechen",
    FallbackTitle = "Anders!"
};

var result = await Plugin.Fingerprint.CrossFingerprint.Current.AuthenticateAsync(dialogConfig);

Other changes

.NET standard support

All PCLs are now targeting .NET standard 1.0. The nuget configuration has been adjusted.

Bugfixes

Of course I fixed some bugs and did some minor improvements. If you are interested in more detail have a look at the changelog.

What next?

I could test the samsung integration only on two devices and the standard implementation only on a simulator. I’d be happy to get some feedback/bug reports/feature request from you :)


Background Photo by c0t0s0d0 / CC BY
Found a typo? Send me a pull request!