eon_cordova_fingerprint object

On the Android-based devices, this object will open a native dialog prompting the user to authenticate using their fingerprint.

On the iOS devices, this object will scan the fingerprint of your user with the TouchID sensor.

Functions

of_init

Description

Connects with the Cordova fingerprint plugin, detects if the plugin is available to call, and binds the current PowerBuilder object with the JavaScript object defined by the plugin. After that, the PowerBuilder object has all of the methods and properties that the JavaScript object has.

Syntax

of_init ( )

Return value

Integer.

1 - Success.

-1 - It is called in PowerBuilder or PowerServer Web, or there is an error.

of_isavailable

Description

Detects if the fingerprint/TouchID sensor works on the device.

Syntax

of_isavailable ( )

Return value

Boolean.

True - Fingerprint/TouchID sensor is working.

False - Fingerprint/TouchID sensor is not working.

of_show

Description

Opens a native dialog to use the device hardware fingerprint scanner to authenticate against fingerprints registered for the device. When the function call is successful, oe_success event will be triggered; when the function call failed, oe_error event will be triggered.

Supported on Android only.

Syntax

of_show ( )

Return value

None.

of_verifyfingerprint_ios

Description

Verifies the fingerprint function. When the function call is successful, oe_success event will be triggered; when the function call failed, oe_error event will be triggered.

Supported on iOS only.

Syntax

of_verifyfingerprint_ios ( )

Return value

None.

Events

oe_error

Description

Occurs when an error occurs during the function call. If the JavaScript function in the Cordova plugin returns any error, that error will be passed to the as_error parameter.

Syntax

oe_error ( string as_error )

Parameter

as_error - A JSON-format string which contains error information returned by the function.

Return value

None

oe_success

Description

Occurs when the function is successfully executed. If the JavaScript function in the Cordova plugin returns any value, that value will be passed to the as_message parameter.

Syntax

oe_success ( string as_message )

Parameter

as_message - A JSON-format string which contains values returned by the function. If the function called is of_isavailable, the return value indicates the fingerprint sensor is working or not.

Return value

None

Properties

boolean ib_ios

Indicates whether the platform is iOS.

oleobject ieon_ole

PowerBuilder OLEObject object to be connected with the Cordova plugin.

powerobject ipo_bindevent

PowerBuilder object to be bound with the JavaScript object.

string is_errorevent

Stores the error event name of the PowerBuilder object.

string is_errorText

Stores the error information returned by the JavaScript function when execution failed.

string is_jserrorText

Stores the JavaScript error information when JavaScript call fails.

string is_successevent

Stores the success event name of the PowerBuilder object.

string is_successText

Stores the value returned by the JavaScript function when execution is successful.