Passport Reader Cordova Plugin
The plugin allows your Android app to read data from a biometric passport.
Installation
-
Clone the plugin source from Github:
git clone --recurse-submodules https://github.com/AppliedRecognition/Passport-Reader-Cordova.git -
Install the plugin in your Cordova project replacing
path/to/plugin
with the location of the plugin you cloned in the previous step:cordova plugin add path/to/plugin -
Build your project:
cordova build android
Scanning Passports
// This object holds the information needed to start the scanvar bacSpec = // Passport number "documentNumber": "123456789" // Date of birth of the passport holder in YYYY-MM-DD format "dateOfBirth": "1970-01-01" // Passport's date of expiry in YYYY-MM-DD format "dateOfExpiry": "2030-01-01";// Start the scanpassportreader;
Detecting a Face in the Result's Image
You can use the scan result's image for face detection using the Ver-ID plugin.
After installing the Ver-ID plugin following the instructions above Ver-ID will be available in window.verid
.
See the Face
type documentation for the properties of the returned face. You can pass the face's faceTemplate
to Ver-ID's compareFaceTemplates
function.
var passportFaceTemplate; // Load Ver-IDverid;