@digiotech/react-native 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -114,3 +114,45 @@ function YourComponent() {
|
|
|
114
114
|
| documentId | string | Document ID Passed from the parent app. For eg: `KID22040413040490937VNTC6LAP8KWD` |
|
|
115
115
|
| message | string | Error message in case of crash or failure |
|
|
116
116
|
| permissions | Array<string> | List of mandatory permissions which are not given during kyc journey |
|
|
117
|
+
|
|
118
|
+
### Android Permissions
|
|
119
|
+
|
|
120
|
+
Add required permissions in the manifest file. Note - This is the common SDK for various KYC flows
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
<!--RECORD_AUDIO and MODIFY_AUDIO_SETTINGS Permission required for Video KYC -->
|
|
124
|
+
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
|
125
|
+
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
|
|
126
|
+
/** Required for geotagging */
|
|
127
|
+
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
|
128
|
+
/** Required for ID card analysis, selfie and face match**/
|
|
129
|
+
<uses-permission android:name="android.permission.CAMERA" />
|
|
130
|
+
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
|
|
131
|
+
```
|
|
132
|
+
A fintech Android app can't access the following permission
|
|
133
|
+
- Read_external_storage
|
|
134
|
+
- Read_media_images
|
|
135
|
+
- Read_contacts
|
|
136
|
+
- Access_fine_location
|
|
137
|
+
- Read_phone_numbers
|
|
138
|
+
- Read_media_videos
|
|
139
|
+
|
|
140
|
+
### IOS Permission
|
|
141
|
+
|
|
142
|
+
Permissions need to add in your info.plist
|
|
143
|
+
```
|
|
144
|
+
/** Camera permission incase of selfie/video KYC/ capture document **/
|
|
145
|
+
<key>NSCameraUsageDescription</key>
|
|
146
|
+
<string>$(PRODUCT_NAME) would like to access your camera.</string>
|
|
147
|
+
<key>NSPhotoLibraryUsageDescription</key>
|
|
148
|
+
<string>$(PRODUCT_NAME) would like to access your photo.</string>
|
|
149
|
+
/** Microphone permission incase of video KYC **/
|
|
150
|
+
<key>NSMicrophoneUsageDescription</key>
|
|
151
|
+
<string>$(PRODUCT_NAME) would like to access your microphone to capture video.</string>
|
|
152
|
+
/** Location permission for geo tagging for camera/video kyc/ selfie **/
|
|
153
|
+
<key>NSLocationWhenInUseUsageDescription</key>
|
|
154
|
+
<string>$(PRODUCT_NAME) would like to access your location.</string>
|
|
155
|
+
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
|
|
156
|
+
<string>$(PRODUCT_NAME) would like to access your location.</string>
|
|
157
|
+
```
|
|
158
|
+
Note : All permissions should be checked and taken before triggering Digio SDK
|
package/android/build.gradle
CHANGED
|
@@ -90,7 +90,7 @@ dependencies {
|
|
|
90
90
|
implementation 'com.github.digio-tech:gateway:v4.0.8'
|
|
91
91
|
implementation fileTree(dir: "libs", include: ["*.aar"])
|
|
92
92
|
// implementation 'com.github.digio-tech:gateway_kyc:v4.0.8'
|
|
93
|
-
implementation 'androidx.appcompat:appcompat:1.
|
|
93
|
+
implementation 'androidx.appcompat:appcompat:1.1.0'
|
|
94
94
|
implementation 'com.google.android.material:material:1.9.0'
|
|
95
95
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
|
96
96
|
implementation "androidx.camera:camera-core:1.1.0"
|
|
Binary file
|
|
@@ -17,6 +17,7 @@ import com.facebook.react.bridge.Arguments;
|
|
|
17
17
|
import com.facebook.react.bridge.Promise;
|
|
18
18
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
19
19
|
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
20
|
+
import com.facebook.react.bridge.LifecycleEventListener;
|
|
20
21
|
import com.facebook.react.bridge.ReactMethod;
|
|
21
22
|
import com.facebook.react.bridge.ReadableMap;
|
|
22
23
|
import com.facebook.react.bridge.WritableArray;
|
|
@@ -40,7 +41,7 @@ import in.digio.sdk.gateway.model.DigioConfig;
|
|
|
40
41
|
import in.digio.sdk.gateway.model.DigioTheme;
|
|
41
42
|
|
|
42
43
|
@ReactModule(name = DigioReactNativeModule.NAME)
|
|
43
|
-
public class DigioReactNativeModule extends ReactContextBaseJavaModule {
|
|
44
|
+
public class DigioReactNativeModule extends ReactContextBaseJavaModule implements LifecycleEventListener {
|
|
44
45
|
public static final String NAME = "DigioReactNative";
|
|
45
46
|
|
|
46
47
|
public static final String AAR_VERSION = "4.0.8";
|
|
@@ -127,11 +128,23 @@ public class DigioReactNativeModule extends ReactContextBaseJavaModule {
|
|
|
127
128
|
public DigioReactNativeModule(ReactApplicationContext reactContext) {
|
|
128
129
|
super(reactContext);
|
|
129
130
|
reactContext.addActivityEventListener(activityEventListener);
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
131
|
+
this.getReactApplicationContext().addLifecycleEventListener(this);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@Override
|
|
135
|
+
public void onHostResume() {
|
|
136
|
+
IntentFilter filter = new IntentFilter(DigioConstants.GATEWAY_EVENT);
|
|
137
|
+
this.getReactApplicationContext().registerReceiver(eventBroadcastReceiver, filter);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
@Override
|
|
141
|
+
public void onHostPause() {
|
|
142
|
+
this.getReactApplicationContext().unregisterReceiver(eventBroadcastReceiver);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
@Override
|
|
146
|
+
public void onHostDestroy() {
|
|
147
|
+
|
|
135
148
|
}
|
|
136
149
|
|
|
137
150
|
@Override
|