react-native-mytatva-rn-sdk 1.2.72 → 1.2.73

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.
@@ -131,6 +131,7 @@ dependencies {
131
131
  implementation 'com.google.android.material:material:1.8.0'
132
132
  implementation 'androidx.activity:activity:1.9.3'
133
133
  implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
134
+ implementation "io.sentry:sentry-android:7.11.0"
134
135
  implementation 'com.github.bumptech.glide:glide:4.15.1'
135
136
  implementation 'com.github.bumptech.glide:okhttp3-integration:4.15.1'
136
137
  implementation 'androidx.multidex:multidex:2.0.1'
@@ -28,6 +28,8 @@ import com.facebook.react.module.annotations.ReactModule
28
28
  import com.facebook.react.modules.core.DeviceEventManagerModule
29
29
  import com.google.gson.Gson
30
30
  import com.google.gson.GsonBuilder
31
+ import io.sentry.Sentry
32
+ import io.sentry.android.core.SentryAndroid
31
33
  import com.mytatvarnsdk.activity.HelpActivity
32
34
  import com.mytatvarnsdk.activity.StartCGMActivity
33
35
  import com.mytatvarnsdk.model.AllCGMLogRequest
@@ -92,6 +94,19 @@ class CgmTrackyLibModule(reactContext: ReactApplicationContext) :
92
94
  ViewModelProvider.AndroidViewModelFactory.getInstance(reactContext.applicationContext as Application)
93
95
  mModel = ViewModelProvider(viewModelStore, factory)[MainActivityModel::class.java]
94
96
  authenticateSDKService = AuthenticateSDKService(scope = scope)
97
+
98
+ initSentryIfNeeded(reactContext)
99
+ }
100
+
101
+ private fun initSentryIfNeeded(context: ReactApplicationContext) {
102
+ if (sentryInitialized.compareAndSet(false, true)) {
103
+ SentryAndroid.init(context.applicationContext) { options ->
104
+ options.dsn = "https://8c1585c04b41a8bdf3271d89c7361530@o4509755819294720.ingest.us.sentry.io/4510520864735232"
105
+ options.isDebug = true // remove or toggle for production
106
+ options.tracesSampleRate = 1.0
107
+ }
108
+ Sentry.captureMessage("Goodflip SDK started")
109
+ }
95
110
  }
96
111
 
97
112
 
@@ -99,6 +114,7 @@ class CgmTrackyLibModule(reactContext: ReactApplicationContext) :
99
114
  var mReactContext: ReactApplicationContext? = null
100
115
  var userToken: String = ""
101
116
  var env: String = ""
117
+ private val sentryInitialized = AtomicBoolean(false)
102
118
  }
103
119
 
104
120
  override fun getName(): String {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-mytatva-rn-sdk",
3
- "version": "1.2.72",
3
+ "version": "1.2.73",
4
4
  "description": "a package to inject data into visit health pwa",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",