@digiotech/react-native 2.0.2 → 2.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
@@ -97,6 +97,9 @@ implementation 'com.github.digio-tech:protean-esign:v3.2'
97
97
  dataBinding true
98
98
  }
99
99
 
100
+ // Make sure your project using
101
+ compileSdkVersion = 35
102
+ targetSdkVersion = 35
100
103
  ```
101
104
 
102
105
  ## SDK Reference
@@ -74,7 +74,7 @@ android {
74
74
  viewBinding true
75
75
  dataBinding true
76
76
  }
77
- buildToolsVersion '33.0.0'
77
+ // buildToolsVersion '33.0.0'
78
78
  }
79
79
 
80
80
  repositories {
@@ -89,7 +89,7 @@ dependencies {
89
89
  //noinspection GradleDynamicVersion
90
90
  implementation "com.facebook.react:react-native:+"
91
91
  // core dependencies
92
- implementation(platform("com.github.digio-tech:digio-bom:v1.0.14"))
92
+ implementation(platform("com.github.digio-tech:digio-bom:v1.0.15"))
93
93
  implementation("androidx.appcompat:appcompat")
94
94
  implementation("com.google.android.material:material")
95
95
  implementation("androidx.navigation:navigation-fragment-ktx")
@@ -1,5 +1,5 @@
1
1
  DigioReactNative_kotlinVersion=1.7.0
2
2
  DigioReactNative_minSdkVersion=21
3
- DigioReactNative_targetSdkVersion=34
4
- DigioReactNative_compileSdkVersion=34
3
+ DigioReactNative_targetSdkVersion=35
4
+ DigioReactNative_compileSdkVersion=35
5
5
  DigioReactNative_ndkversion=21.4.7075529
@@ -51,6 +51,7 @@ public class DigioReactNativeModule extends ReactContextBaseJavaModule implement
51
51
  public static final int DIGIO_ACTIVITY = 73457843;
52
52
  private Promise resultPromise;
53
53
  private boolean isReceiverRegistered = false;
54
+ private boolean isResultHandled = false;
54
55
 
55
56
 
56
57
  private BroadcastReceiver eventBroadcastReceiver = new BroadcastReceiver() {
@@ -81,9 +82,19 @@ public class DigioReactNativeModule extends ReactContextBaseJavaModule implement
81
82
  ActivityEventListener activityEventListener = new ActivityEventListener() {
82
83
  @Override
83
84
  public void onActivityResult(Activity activity, int requestCode, int resultCode, @Nullable Intent intent) {
84
- if (requestCode == DIGIO_ACTIVITY) {
85
- int responseCode = intent.getIntExtra("responseCode", 0);
86
- onNativeActivityResult(responseCode, intent);
85
+ if (requestCode == DIGIO_ACTIVITY && !isResultHandled) {
86
+ isResultHandled = true;
87
+ if (intent != null) {
88
+ int responseCode = 0;
89
+ if (intent.hasExtra("responseCode")) {
90
+ responseCode = intent.getIntExtra("responseCode", 0);
91
+ }else{
92
+ responseCode = intent.getIntExtra("errorCode", 0);
93
+ }
94
+ onNativeActivityResult(responseCode, intent);
95
+ }else{
96
+ onNativeActivityResult(resultCode, null);
97
+ }
87
98
  }
88
99
  }
89
100
 
@@ -249,6 +260,7 @@ public class DigioReactNativeModule extends ReactContextBaseJavaModule implement
249
260
  digioConfig.setAdditionalData(additionalDataMap);
250
261
  intent.putExtra("config", digioConfig);
251
262
 
263
+ isResultHandled = false;
252
264
  this.getCurrentActivity().startActivityForResult(intent, DIGIO_ACTIVITY);
253
265
  } catch (Exception e) {
254
266
  // Throws DigioException if WorkflowResponseListener is not implemented/passed, or
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digiotech/react-native",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
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",