@convivainc/conviva-react-native-appanalytics 0.2.5 → 0.2.6

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/CHANGELOG.md CHANGED
@@ -1,6 +1,15 @@
1
1
 
2
2
  # Changelog
3
3
 
4
+ ## 0.2.6 (16/Dec/2025)
5
+ - Improved App Load Time metric by collecting more data.
6
+ - Using latest android(v1.2.6) and ios(v1.7.0) native packages.
7
+
8
+ ## 0.2.5 (25/Nov/2025)
9
+ - Improved crash reporting and ANRs to deliver deeper insights and faster fixes for a more stable app experience. Applicable for:
10
+ - Android 11 (API 30) and above
11
+ - iOS 14 and above
12
+
4
13
  ## 0.2.4 (16/Oct/2025)
5
14
  - Using latest android(v1.2.3) and ios(v1.5.0) native packages.
6
15
 
@@ -20,5 +20,5 @@ Pod::Spec.new do |s|
20
20
  s.requires_arc = true
21
21
 
22
22
  s.dependency "React-Core"
23
- s.dependency "ConvivaAppAnalytics", "1.6.0"
23
+ s.dependency "ConvivaAppAnalytics", "1.7.0"
24
24
  end
@@ -55,5 +55,5 @@ dependencies {
55
55
  implementation "com.squareup.okhttp3:okhttp:4.9.3"
56
56
  implementation "com.facebook.react:react-native:+"
57
57
  implementation 'com.googlecode.json-simple:json-simple:1.1'
58
- implementation 'com.conviva.sdk:conviva-android-tracker:1.2.5'
58
+ implementation 'com.conviva.sdk:conviva-android-tracker:1.2.6'
59
59
  }
@@ -48,13 +48,40 @@ import java.util.concurrent.TimeUnit;
48
48
  import okhttp3.OkHttpClient;
49
49
  import okhttp3.Request;
50
50
 
51
+ import com.facebook.react.bridge.ReactMarker;
52
+ import com.facebook.react.bridge.ReactMarker.MarkerListener;
53
+ import com.facebook.react.bridge.ReactMarkerConstants;
54
+
55
+
51
56
  public class RNConvivaTrackerModule extends ReactContextBaseJavaModule {
52
57
 
53
58
  private final ReactApplicationContext reactContext;
54
59
 
60
+ public static volatile long contentAppearedTimestamp;
61
+
62
+
55
63
  public RNConvivaTrackerModule(ReactApplicationContext reactContext) {
56
64
  super(reactContext);
57
65
  this.reactContext = reactContext;
66
+
67
+ addContentAppearedMarkerListener();
68
+ }
69
+
70
+ private void addContentAppearedMarkerListener() {
71
+ if (contentAppearedTimestamp <= 0) {
72
+ ReactMarker.addListener(new MarkerListener() {
73
+ @Override
74
+ public void logMarker(ReactMarkerConstants name, String tag, int instanceKey) {
75
+ if (name == ReactMarkerConstants.CONTENT_APPEARED && contentAppearedTimestamp <= 0) {
76
+ contentAppearedTimestamp = System.currentTimeMillis();
77
+ TrackerController tracker = ConvivaAppAnalytics.getDefaultTracker();
78
+ if (tracker != null) {
79
+ tracker.setContentAppearedTimestamp(contentAppearedTimestamp);
80
+ }
81
+ }
82
+ }
83
+ });
84
+ }
58
85
  }
59
86
 
60
87
  @Override
@@ -163,7 +190,12 @@ public class RNConvivaTrackerModule extends ReactContextBaseJavaModule {
163
190
  }
164
191
 
165
192
  // create the tracker
166
- ConvivaAppAnalytics.createTracker(this.reactContext, customerKey, appName, controllers.toArray(new Configuration[controllers.size()]));
193
+ TrackerController trackerController = ConvivaAppAnalytics.createTracker(this.reactContext, customerKey, appName, controllers.toArray(new Configuration[controllers.size()]));
194
+
195
+ //Set the contentAppearedTimestamp if already captured
196
+ if(trackerController != null && contentAppearedTimestamp > 0) {
197
+ trackerController.setContentAppearedTimestamp(contentAppearedTimestamp);
198
+ }
167
199
 
168
200
  promise.resolve(true);
169
201
 
@@ -957,6 +989,21 @@ public class RNConvivaTrackerModule extends ReactContextBaseJavaModule {
957
989
  }
958
990
  }
959
991
 
992
+ @ReactMethod
993
+ private void setContentAppearedTimestamp(ReadableMap argmap, Promise promise) {
994
+ try {
995
+ String namespace = argmap.getString("tracker");
996
+ long contentAppearedTimestamp = (long) argmap.getDouble("contentAppearedTimestamp");
997
+ TrackerController trackerController = getTracker(namespace);
998
+ if (trackerController != null) {
999
+ trackerController.setContentAppearedTimestamp(contentAppearedTimestamp);
1000
+ }
1001
+ promise.resolve(true);
1002
+ } catch (Throwable t) {
1003
+ promise.reject("ERROR", t.getMessage());
1004
+ }
1005
+ }
1006
+
960
1007
  private TrackerController getTracker(String namespace) {
961
1008
  return namespace == null ? ConvivaAppAnalytics.getDefaultTracker() : ConvivaAppAnalytics.getTracker(namespace);
962
1009
  }
@@ -4,6 +4,6 @@ import com.conviva.react.apptracker.BuildConfig;
4
4
 
5
5
  public class TrackerVersion {
6
6
 
7
- public final static String RN_CONVIVA_TRACKER_VERSION = "rn-0.2.5";
7
+ public final static String RN_CONVIVA_TRACKER_VERSION = "rn-0.2.6";
8
8
 
9
9
  }
@@ -22,6 +22,6 @@
22
22
 
23
23
  @implementation RNTrackerVersion
24
24
 
25
- NSString * const kRNTrackerVersion = @"rn-0.2.5";
25
+ NSString * const kRNTrackerVersion = @"rn-0.2.6";
26
26
 
27
27
  @end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@convivainc/conviva-react-native-appanalytics",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "Conviva React Native Application Analytics Library",
5
5
  "main": "conviva-react-native-appanalytics.js",
6
6
  "repository": {