Biometrics API

This External Object is deprecated as of SmartDevicesPlus 6.

This functionality was replaced by GeneXus' own biometrics integration.

Using the external object:

You can use the 'SDPBiometrics' External Object like any other GeneXus external object.

BiometricsImg02

This external object has the following methods:

IsAvailable:

Return True when the fingerprint scanner is available and False if not.

GetLastMessage:

This method returns the error message when any operation fails so you can understand the cause of the problem.

Authenticate:

Returns True when the user authenticated properly (Fingerprint or Face ID).

StoreDataWithBiometrics:

This method encrypts and saves the information cached in the external object using the fingerprint. User will be prompted to authenticate before storing the information.

ReadDataWithBiometrics:

This method recovers the saved and encrypted information using the fingerprint. User will be prompted to authenticate before the information is obtained.

DeleteSecureData:

This method deletes stored information.

Add/Get/Remove/Clear CacheData:

This methods are used to handle the cached information of the external object.

Cache is only meant to store temporal information, inside a single event. User can add/remove as many fields as wanted in the cache, but must consider that cached information is not secured and is not recovered nor stored automatically, so this functions must be used in conjunction with the operations ReadDataWithBiometrics and StoreDataWithBiometrics. After the information is stored, cache must be cleared.

Examples

Use the fingerprint before calling a SDPanel or WorkWithDevices

In this example the fingerprint authentication is requested when you call some object.

BiometricsImg03

Save information in the fingerprint:

In this example information is saved in the cache of the fingerprint.

BiometricsImg04

Recover Information to the fingerprint:

In this example information is recovered from the cache of the fingerprint and then the cache is cleared.

BiometricsImg05

Activation of Fingerprint in the device/emulator

Android

To use the fingerprint functionality you need to have the fingerprint enabled in the device. In the following link you can see how do it:

https://android.gadgethacks.com/how-to/android-basics-unlock-your-phone-with-your-fingerprint-0171206/

If you are working with the Android SDK emulator, you should emulate the fingerprint recognition from the following option:

BiometricsImg06

iOS

To use this feature in iOS you should enable the Touch ID in the device. If you are working with the XCode Simulator you can do it as follows:

https://developer.apple.com/library/content/documentation/IDEs/Conceptual/iOS_Simulator_Guide/InteractingwithiOSandwatchOS/InteractingwithiOSandwatchOS.html