@sentiance-react-native/legacy 6.4.0-rc.3 → 6.5.0

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.
@@ -19,9 +19,11 @@ import com.facebook.react.bridge.ReactMethod;
19
19
  import com.facebook.react.bridge.ReadableMap;
20
20
  import com.sentiance.react.bridge.core.SentianceConverter;
21
21
  import com.sentiance.react.bridge.core.base.AbstractSentianceModule;
22
+ import com.sentiance.react.bridge.core.common.SentianceSubscriptionsManager;
22
23
  import com.sentiance.sdk.OnInitCallback;
23
24
  import com.sentiance.sdk.ResetCallback;
24
25
  import com.sentiance.sdk.SdkStatus;
26
+ import com.sentiance.sdk.Sentiance;
25
27
  import com.sentiance.sdk.SubmitDetectionsCallback;
26
28
  import com.sentiance.sdk.Token;
27
29
  import com.sentiance.sdk.TokenResultCallback;
@@ -40,7 +42,7 @@ public class LegacySentianceModule extends AbstractSentianceModule implements Li
40
42
  private final StartFinishedHandlerCreator startFinishedHandlerCreator;
41
43
 
42
44
  public LegacySentianceModule(ReactApplicationContext reactContext) {
43
- super(reactContext);
45
+ super(reactContext, Sentiance.getInstance(reactContext), new SentianceSubscriptionsManager());
44
46
  legacySentianceHelper = RNSentianceHelper.getInstance(reactContext);
45
47
  startFinishedHandlerCreator = new StartFinishedHandlerCreator();
46
48
  }
@@ -125,7 +127,7 @@ public class LegacySentianceModule extends AbstractSentianceModule implements Li
125
127
  @ReactMethod
126
128
  @SuppressWarnings("unused")
127
129
  public void reset(final Promise promise) {
128
- sdk.reset(new ResetCallback() {
130
+ mSdk.reset(new ResetCallback() {
129
131
  @Override
130
132
  public void onResetSuccess() {
131
133
  legacySentianceHelper.disableNativeInitialization();
@@ -167,7 +169,7 @@ public class LegacySentianceModule extends AbstractSentianceModule implements Li
167
169
  return;
168
170
  }
169
171
 
170
- sdk.stop();
172
+ mSdk.stop();
171
173
  promise.resolve(true);
172
174
  }
173
175
 
@@ -185,7 +187,7 @@ public class LegacySentianceModule extends AbstractSentianceModule implements Li
185
187
  }
186
188
  }
187
189
  final TransportMode transportModeHint = SentianceConverter.toTransportMode(hint);
188
- sdk.startTrip(metadataMap, transportModeHint, new StartTripCallback() {
190
+ mSdk.startTrip(metadataMap, transportModeHint, new StartTripCallback() {
189
191
  @Override
190
192
  public void onSuccess() {
191
193
  promise.resolve(true);
@@ -205,7 +207,7 @@ public class LegacySentianceModule extends AbstractSentianceModule implements Li
205
207
  return;
206
208
  }
207
209
 
208
- sdk.stopTrip(new StopTripCallback() {
210
+ mSdk.stopTrip(new StopTripCallback() {
209
211
  @Override
210
212
  public void onSuccess() {
211
213
  promise.resolve(true);
@@ -264,7 +266,7 @@ public class LegacySentianceModule extends AbstractSentianceModule implements Li
264
266
  return;
265
267
  }
266
268
 
267
- sdk.getUserAccessToken(new TokenResultCallback() {
269
+ mSdk.getUserAccessToken(new TokenResultCallback() {
268
270
  @Override
269
271
  public void onSuccess(@NonNull Token token) {
270
272
  promise.resolve(SentianceConverter.convertToken(token));
@@ -285,7 +287,7 @@ public class LegacySentianceModule extends AbstractSentianceModule implements Li
285
287
  return;
286
288
  }
287
289
 
288
- sdk.submitDetections(new SubmitDetectionsCallback() {
290
+ mSdk.submitDetections(new SubmitDetectionsCallback() {
289
291
  @Override
290
292
  public void onSuccess() {
291
293
  promise.resolve(true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentiance-react-native/legacy",
3
- "version": "6.4.0-rc.3",
3
+ "version": "6.5.0",
4
4
  "description": "React Native Sentiance - This module provides a legacy API.",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -14,7 +14,7 @@
14
14
  "sentiance"
15
15
  ],
16
16
  "peerDependencies": {
17
- "@sentiance-react-native/crash-detection": "6.4.0-rc.3"
17
+ "@sentiance-react-native/crash-detection": "6.5.0"
18
18
  },
19
19
  "author": "",
20
20
  "license": "",