cordova_accurascan_finger
v1.0.0
Published
Below steps to setup Accura Scan's SDK to your project.
Maintainers
Readme
Cordova Accura Scan Finger
Below steps to setup Accura Scan's SDK to your project.
Note:-
Add the plugin:- cordova plugin add cordova_accurascan_finger
Usage var accura = cordova.plugins.cordova_accurascan_finger;
1.Setup Android
Add it in your root build.gradle at the end of repositories.
allprojects {
repositories {
google()
jcenter()
maven {
url 'https://jitpack.io'
credentials { username 'jp_ssguccab6c5ge2l4jitaj92ek2' }
}
}
}Add it in your app/build.gradle file.
android{
...
packagingOptions {
pickFirst 'lib/arm64-v8a/libcrypto.so'
pickFirst 'lib/arm64-v8a/libssl.so'
pickFirst 'lib/armeabi-v7a/libcrypto.so'
pickFirst 'lib/armeabi-v7a/libssl.so'
pickFirst 'lib/x86/libcrypto.so'
pickFirst 'lib/x86/libssl.so'
pickFirst 'lib/x86_64/libcrypto.so'
pickFirst 'lib/x86_64/libssl.so'
}
}2.Setup iOS
1.Install Git LFS using command install git-lfs
2.Run pod install
Add this permissions into iOS Info.plist file.
<key>NSCameraUsageDescription</key>
<string>App usage camera for scan documents.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>App usage photos for get document picture.</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>App usage photos for save document picture.</string>3.Setup Accura Scan licenses into your projects
Accura Scan has two license require for use full functionality of this library. Generate your own Accura license from here key.license
This license is compulsory for this library to work. it will get all setup of accura SDK.
For Android
Create "assets" folder under app/src/main and Add license file in to assets folder.
- key.license // for Accura Scan Finger
For iOS
Place both the license in your project's Runner directory, and add the licenses to the target.4.Get license configuration from SDK. It returns all active functionalities of your license.
Setting up License
accura.getMetadata(function (result) {
if(result.isValid){
console.log(result)
}
}, function (error) {
alert(error);
})Error: String
Success: JSON String Response = { isMICR: boolean }
5.Method for Finger Enrollment.
startEnroll: function() {
const hand = 'left' //or 'right'
accura.startFingerEnroll(
[hand],
result => {
try {
const template = JSON.parse(result).template_data;
this.enrollTemplateArray = Object.values(template);
} catch (e) {
console.error('Enrollment parse error:', e);
}
},
error => {
console.error('Enrollment failed:', error);
alert('Enrollment failed: ' + error);
}
);
},Success: JSON Response {
image_data: JSONObjects?,
template_data: JSONObjects?
}
Error: String
6.Method for Finger Verification.
startVerify: function() {
const hand = 'left' //or 'right'
accura.startFingerVerify(
[hand],
result => {
try {
const template = JSON.parse(result).template_data;
this.verifyTemplateArray = Object.values(template);
} catch (e) {
console.error('Verification parse error:', e);
}
},
error => {
console.error('Verification failed:', error);
alert('Verification failed: ' + error);
}
);
},Success: JSON Response {
image_data: JSONObjects?,
template_data: JSONObjects?
}
Error: String
7.Method to Get Result.
getResult: function() {
accura.getResult(
enrollTemplateArray, verifyTemplateArray,
result => {
console.log('Comparison result:', result);
},
error => {
console.error('Comparison error:', error);
}
);
}enrollTemplateArray: Array of template_data of enrolled finger verifyTemplateArray Array of template_data of veriying finger
Success: JSON Response {isValid:string} Error: String
Contributing See the contributing guide to learn how to contribute to the repository and the development workflow.
License: MIT
