hlc.blinkid
v0.0.3
Published
HLC Custom Mobile Plugin Read Card ID and to Scan Documents
Downloads
10
Readme
Cordova Blink ID Plugin
BlinkID is a part of family of SDKs developed by MicroBlink for optical text recognition, barcode scanning, ID document scanning and many others.
Plugin
The purpose of this plugin is to leverage Hybrid Applications with BlinkID SDK features. With this plugin the users can read the Card ID within a Web Application.
As with all the cordova plugins, the plugin isn't available until the execution of deviceready
event.
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
// ...
}
Supported Platforms
- iOS
- Android
Installation
- Run the following command:
cordova plugin add http://hlcbitbucket01:7990/scm/cordova/blinkid-plugin.git
Blink ID
The Blink ID Plugin
provides an easy way to read ID cards and get a JSON with the result in your a mobile app.
Methods
- readCardId: Method to read ID Cards, passports and drivers licenses.
readCardId
Parameters:
successCallback: A callback that is passed when the service is started with success. (Function)
errorCallback: A callback that executes if an error occurs retrieving the
Blink ID Plugin
readCardId. (Function)
Example
var success = function (r) {
console.log(r);
}
var fail = function (error) {
console.log(error);
}
var licenseKey = "YOUR_LICENSE";
cordova.plugins.blinkId.readCardId(success, fail, licenseKey);
The success callback gets a JSON object with the following contents:
{
"dateOfBirth" : "",
"nationality" : "",
"documentCode" : "",
"sex" : "",
"dateOfExpiry" : "",
"issuer" : "",
"primaryId" : "",
"opt2" : "",
"mrzText" : "",
"isParsed" : "",
"secondaryId" : "",
"opt1" : "",
"documentNumber" : ""
}