@socure-inc/docv-react-native 5.0.6 → 5.0.7

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.
@@ -136,7 +136,7 @@ dependencies {
136
136
  //noinspection GradleDynamicVersion
137
137
  implementation "com.facebook.react:react-native:+"
138
138
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
139
- implementation "com.socure.android:docv-capture:5.1.1"
139
+ implementation "com.socure.android:docv-capture:5.2.2"
140
140
 
141
141
  def retrofit_version = "2.9.0"
142
142
  implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
@@ -41,7 +41,12 @@ class SocureDocVReactNativeModule(reactContext: ReactApplicationContext) :
41
41
  fun launchDocVSdk(onSuccess: Callback, onError: Callback) {
42
42
  Log.d(TAG, "launchDocVSdk - launch using experimental api")
43
43
  setupLaunch(onSuccess, onError)
44
- currentActivity?.run {
44
+ val activity = reactApplicationContext.currentActivity
45
+ if (activity == null) {
46
+ Log.e(TAG, "Aborting since app activity object is null")
47
+ return
48
+ }
49
+ activity.run {
45
50
  startActivityForResult(SocureSdk.getIntent(this), SOCURE_SDK_REQUEST_CODE)
46
51
  }
47
52
  }
@@ -56,8 +61,13 @@ class SocureDocVReactNativeModule(reactContext: ReactApplicationContext) :
56
61
  ) {
57
62
  Log.d(TAG, "launchSocureDocV - launch Socure SDK")
58
63
  setupLaunch(onSuccess, onError)
64
+ val activity = reactApplicationContext.currentActivity
65
+ if (activity == null) {
66
+ Log.e(TAG, "Aborting since app activity object is null")
67
+ return
68
+ }
59
69
 
60
- currentActivity?.run {
70
+ activity.run {
61
71
  startActivityForResult(
62
72
  SocureSdk.getIntent(
63
73
  this,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@socure-inc/docv-react-native",
3
- "version": "5.0.6",
3
+ "version": "5.0.7",
4
4
  "description": "The Predictive Document Verification (DocV) SDK React Native bridge allows you to use the DocV SDK v4 for Android and iOS in your React Native application.",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -18,7 +18,7 @@ Pod::Spec.new do |s|
18
18
  s.source_files = "ios/**/*.{h,m,mm,swift}"
19
19
 
20
20
  s.dependency "React"
21
- s.dependency "SocureDocV", "5.1.1"
21
+ s.dependency "SocureDocV", "5.2.6"
22
22
  s.dependency "SocureDeviceRisk", "4.5.2"
23
23
 
24
24
  end