Instructions
U.are.U SDK - Developer Guide 33
The JavaScript API
THIS CHAPTER DESCRIBES HOW TO USE THE JAVASCRIPT API.
The JavaScript API, and an included JavaScript-based sample application, are provided as part of the U.are.U for
Windows SDK 3.0 and above.
The API provides web-based capture of fingerprints on the Windows platform through the following browsers:
Internet Explorer, Microsoft Edge, Google Chrome or Mozilla Firefox. Note that it provides capture only, and does not
provide authentication or identification.
This chapter provides a complete description of the methods, events and enumerations of the JavaScript API. For
details on installation, setting up the JavaScript development environment, and using the sample application, consult
the U.are.U SDK Windows Platform Guide (version 3.0 or later).
Overview
T
he JavaScript API allows web applications to conveniently and securely acquire fingerprint data from a supported
fingerprint reader connected to the user's device. The API allows software developers to:
• Enumerate fingerprint readers
• Select a fingerprint reader to be used with fingerprint capture
• Get the characteristics of a fingerprint reader
• Start fingerprint capture using a selected fingerprint reader
• Stop fingerprint capture
• Receive captured fingerprints in the following formats: PNG image, WSQ, Intermediate and Raw.
• Receive activity notifications from the fingerprint reader
• Receive an indication of the quality of the fingerprint capture
• Monitor device connection and disconnection
Using the fingerprint library
The Fingerprint Library consists of two JavaScript files, referenced through use of the HTML <script> tag. In the
example below, the ECMAScript 6 shim is also included.
<script src="es6-shim.js"></script>
<script src=" websdk.client.bundle.min.js"></script>
<script src=" fingerprint.sdk.min.js"></script>
All the functionality of the Fingerprint Library is accessed with the Fingerprint.WebApi object. You create an instance
of Fingerprint.WebApi as shown below.
this.sdk = new Fingerprint.WebApi;
Fingerprint.WebApi methods
The table below lists all of the Fingerpirnt.WebApi methods.
Method Description
enumerateDevices()
Returns the list of fingerprint reader identifiers.
getDeviceInfo()
Returns information about a fingerprint reader.
startAcquisition()
Starts fingerprint capture.
stopAcquisition
Stops fingerprint capture.