@digiotech/react-native 1.0.12 → 1.0.14

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
@@ -86,7 +86,7 @@ function YourComponent() {
86
86
 
87
87
  ## Android
88
88
  #### Note: Incase you are using camera feature and facing black screen on camera then follow below steps
89
- - Add digioKycworkflow.aar file inside your react project under android/app/libs folder. [Download digio_kyc_workflow-4.0.9.aar](https://drive.google.com/file/d/1FGhaihW42uL3dqGVMohvgu7Ie5EbBKb8/view?usp=sharing)
89
+ - Add digioKycworkflow.aar file inside your react project under android/app/libs folder. [Download digio_kyc_workflow-4.0.15.aar](https://drive.google.com/file/d/1nHeZhDBPavLxwJp0VgNrMiEZpXswENgz/view?usp=sharing)
90
90
 
91
91
 
92
92
  - Add below in your project under build.gradle file inside dependencies
@@ -88,10 +88,10 @@ dependencies {
88
88
  // For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
89
89
  //noinspection GradleDynamicVersion
90
90
  implementation "com.facebook.react:react-native:+"
91
- implementation 'com.github.digio-tech:gateway:v4.0.8'
92
- // implementation 'com.github.digio-tech:gateway_kyc:v4.0.12_beta'
91
+ implementation 'com.github.digio-tech:gateway:v4.0.10'
92
+ compileOnly 'com.github.digio-tech:gateway_kyc:v4.0.15'
93
93
  implementation 'com.github.digio-tech:gateway_esign:4.0.8_beta1'
94
- compileOnly fileTree(dir: "libs", include: ["*.aar"])
94
+ // compileOnly fileTree(dir: "libs", include: ["*.aar"])
95
95
  implementation 'androidx.appcompat:appcompat:1.6.1'
96
96
  implementation 'com.google.android.material:material:1.9.0'
97
97
  implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
@@ -105,5 +105,9 @@ dependencies {
105
105
  implementation 'com.google.android.gms:play-services-mlkit-face-detection:17.1.0'
106
106
  implementation 'com.google.android.gms:play-services-location:21.0.1'
107
107
  implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
108
+
109
+ compileOnly 'com.github.digio-tech:protean-esign:v3.2'
110
+ implementation 'com.android.volley:volley:1.2.1'
111
+ implementation 'com.scottyab:rootbeer-lib:0.1.0'
108
112
  }
109
113
 
@@ -1,5 +1,6 @@
1
1
  package com.digioreactnative;
2
2
 
3
+ import android.util.Log;
3
4
  import android.annotation.SuppressLint;
4
5
  import android.app.Activity;
5
6
  import android.content.BroadcastReceiver;
@@ -46,6 +47,8 @@ public class DigioReactNativeModule extends ReactContextBaseJavaModule implement
46
47
  public static final String AAR_VERSION = "4.0.8";
47
48
  public static final int DIGIO_ACTIVITY = 73457843;
48
49
  private Promise resultPromise;
50
+ private boolean isReceiverRegistered = false;
51
+
49
52
 
50
53
  private BroadcastReceiver eventBroadcastReceiver = new BroadcastReceiver() {
51
54
 
@@ -132,18 +135,25 @@ public class DigioReactNativeModule extends ReactContextBaseJavaModule implement
132
135
 
133
136
  @Override
134
137
  public void onHostResume() {
135
- IntentFilter filter = new IntentFilter(DigioConstants.GATEWAY_EVENT);
136
- this.getReactApplicationContext().registerReceiver(eventBroadcastReceiver, filter);
138
+ if (!isReceiverRegistered) {
139
+ IntentFilter filter = new IntentFilter(DigioConstants.GATEWAY_EVENT);
140
+ this.getReactApplicationContext().registerReceiver(eventBroadcastReceiver, filter);
141
+ isReceiverRegistered = true;
142
+ }
143
+
137
144
  }
138
145
 
139
146
  @Override
140
147
  public void onHostPause() {
141
- this.getReactApplicationContext().unregisterReceiver(eventBroadcastReceiver);
148
+ // this.getReactApplicationContext().unregisterReceiver(eventBroadcastReceiver);
142
149
  }
143
150
 
144
151
  @Override
145
152
  public void onHostDestroy() {
146
-
153
+ if (isReceiverRegistered) {
154
+ this.getReactApplicationContext().unregisterReceiver(eventBroadcastReceiver);
155
+ isReceiverRegistered = false;
156
+ }
147
157
  }
148
158
 
149
159
  @Override
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digiotech/react-native",
3
- "version": "1.0.12",
3
+ "version": "1.0.14",
4
4
  "description": "SDK for invoking client side journey for any of Digio request",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",