Instructions
U.are.U SDK - Developer Guide 35
The JavaScript API
DeviceInfo
The DeviceInfo object contains information about the fingerprint reader.
Code Snippet
The following code will print out device information for all connected fingerprint readers (enumerated devices).
var FingerprintSdkTest = (function () {
function FingerprintSdkTest() {
this.sdk = new Fingerprint.WebApi;
}
FingerprintSdkTest.prototype.getDeviceList = function () {
return this.sdk.enumerateDevices();
};
FingerprintSdkTest.prototype.getDeviceInfoWithID = function (uid) {
var _instance = this;
return this.sdk.getDeviceInfo(uid);
};
return FingerprintSdkTest;
})();
window.onload = function () {
test = new FingerprintSdkTest();
var allReaders = test.getDeviceList();
allReaders.then(function (sucessObj) {
for (i=0;i<sucessObj.length;i++){
printDeviceInfo(sucessObj[i]);
}
}, function (error){
console.log(error.message);
});
}
function printDeviceInfo(uid){
var myDeviceVal = test.getDeviceInfoWithID(uid);
myDeviceVal.then(function (sucessObj) {
console.log(sucessObj.DeviceID); //A string containing the unique
identifier of the fingerprint reader.
console.log(Fingerprint.DeviceTechnology[sucessObj.eDeviceTech]); // One of
the DeviceUidType enumeration values that specifies the type of the unique identifier
of the fingerprint reader.
Parameter Description
deviceID
A string containing the unique identifier of the fingerprint reader.
eUidType
One of the DeviceUidType enumeration values that specifies the type of the unique
identifier of the fingerprint reader.
eDeviceModality
One of the DeviceModality enumeration values that specifies the capture process used by
the fingerprint reader.
eDeviceTech
One of the DeviceTechnology enumeration values that specifies the fingerprint reader
technology.