react-native-accurascan-finger
v1.0.1
Published
test
Readme
React Native Accura Scan Finger
Note:-
yarn add 'react-native-accurascan-finger'
OR
npm i react-native-accurascan-finger
Usage
Import npm library into file.
import AccurascanFinger from 'react-native-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_45kf9tvkijvd9c7cf34mehj1b6' }
}
}
}Add it in your app/build.gradle file.
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'
}
splits {
abi {
...
reset()
include 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
}2.Setup iOS
1.Install Git LFS using command install git-lfs
2.Add the following in your podfile
use_frameworks! below prepare_react_native_project!
3.Run pod install
Add this permissions into iOS Info.plist file.
<key>NSCameraUsageDescription</key>
<string>App usage camera for scan documents.</string>3.Setup Accura Scan licenses into your projects
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 FingerFor iOS
Place 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
getAccuraSetup = () => {
//Method for get license info from native OS.
AccurascanFinger.getMetaData((error, response) => {
if (error != null) {
console.log(error);
} else {
console.log(response);
}
});
};Error: String
Success: JSON String Response = { isValid: boolean, isFinger:boolean }
5.Method for Enroll scan Finger documents.
const startEnroll = async () => {
const handSelected = rightHand ? "right" : "left";
//Method for start Enroll Finger scaning from native OS.
AccurascanFinger.startFingerEnroll([handSelected], (error, result) => {
if (error) {
console.error('Enrollment error:', error);
return;
}
const parsedResult = JSON.parse(result);
const tempDict = parsedResult.template_data;
console.log('Success!', Object.values(tempDict));
});
};Error: String
Success: JSON String Response = { image_data: object, template_data:object }
6.Method for Verify scan Finger documents.
const startVerify = async () => {
const handSelected = rightHand ? "right" : "left";
AccurascanFinger.startFingerVerify([handSelected], (error, result) => {
if (error) {
console.error('Verify error:', error);
return;
}
const parsedResult = JSON.parse(result);
const tempDict = parsedResult.template_data;
console.log("Success!", Object.values(tempDict));
});
};Error: String
Success: JSON String Response = { image_data: object, template_data:object }
7.Method for GetResult scan Finger documents.
const getResult = async (tempDict) => {
AccurascanFinger.getResult([enrollTemplate, verifyTemplate], (error, result) => {
if (error) {
console.error('getResult error:', error);
return;
}
console.log('getResult result:', result);
const parsedResult = JSON.parse(result);
console.log("RESULT:", parsedResult);
});
};Error: String
Success: JSON String Response = { isValid: String }
Contributing See the contributing guide to learn how to contribute to the repository and the development workflow.
License: MIT
