Android React Wrapper
-
Setup the React Native development environment based on the development and target OS by following the steps here,
Setting up the development environment -
Download and unzip the ReactNativeResources archive, it consists of the react-native, android_resources, reference and android_code directories.
ReactNativeSDK2AndroidResources -
Create an empty React Native application
npx @react-native-community/cli init IDMTest
-
Add Javascript code. Copy and paste the contents of react-native folder to the main project folder. Overwrite files if required.
-
Add React Native dependencies. In package.json change the dependencies node.
"dependencies": {
"@react-native/new-app-screen": "0.83.1",
"@react-navigation/native": "^7.1.28",
"@react-navigation/native-stack": "^7.12.0",
"@react-navigation/stack": "^7.7.1",
"native-base": "^3.4.28",
"react": "19.2.0",
"react-dom": "^19.2.0",
"react-native": "0.83.1",
"react-native-gesture-handler": "^1.9.0",
"react-native-safe-area-context": "^5.6.2",
"react-native-screens": "^4.23.0",
"react-native-svg": "^15.15.3"
},
- Delete node_modules folder. Build React Native application using the following command,
npm install
-
Open android directory in Android Studio
-
Add Android code. Add files from android_code directory. Overwrite files if required.
-
Overwrite main build.gradle file from android_resources.
- Modify app project’s build.gradle. An example is available in the reference directory.
- Add following dependencies,
implementation 'com.idmission.sdk2:idmission-sdk:11.1.01.2.04'
- Sync Now the code in Android Studio
- Build and run the android app,
npx react-native run-android --port=8081
- Initialize - Initializes the SDK.
- ID Validation - Initiates ID Validation(Service ID 20) flow.
- ID Validation and Match Face - Initiates ID Validation and Match Face(Service ID 10) flow.
- Identify Customer - Initiates Identify Customer(Service ID 185) flow.
- Live Face Check - Initiates Live Face Check(Service ID 660) flow.
- ID Validation and Customer Enroll - Initiates ID Validation and Customer Enroll(Service ID 50) flow.
- Customer Enroll Biometrics - Initiates Customer Enroll Biometrics(Service ID 175) flow.
- Customer Verification - Initiates Customer Verification(Service ID 105) flow.
- Submit Result - Submits the form.
Available Functions
IDMissionSDK.initializeSDK(String apiBaseUrl, String authUrl, String debug, String accessToken)
IDMissionSDK.serviceID20()
IDMissionSDK.serviceID10()
IDMissionSDK.serviceID185()
IDMissionSDK.serviceID660()
IDMissionSDK.serviceID50(String uniqueCustomerNumber)
IDMissionSDK.serviceID175(String uniqueCustomerNumber)
IDMissionSDK.serviceID105(String uniqueCustomerNumber)
IDMissionSDK.submitResult()