react-native-gleapsdk 8.4.3 → 8.4.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.
@@ -18,10 +18,10 @@ def safeExtGet(prop, fallback) {
18
18
  }
19
19
 
20
20
  android {
21
- compileSdkVersion safeExtGet('Gleapsdk_compileSdkVersion', 31)
21
+ compileSdkVersion safeExtGet('Gleapsdk_compileSdkVersion', 33)
22
22
  defaultConfig {
23
- minSdkVersion safeExtGet('Gleapsdk_minSdkVersion', 16)
24
- targetSdkVersion safeExtGet('Gleapsdk_targetSdkVersion', 31)
23
+ minSdkVersion safeExtGet('Gleapsdk_minSdkVersion', 21)
24
+ targetSdkVersion safeExtGet('Gleapsdk_targetSdkVersion', 33)
25
25
  versionCode 1
26
26
  versionName "1.0"
27
27
 
@@ -53,7 +53,8 @@ repositories {
53
53
 
54
54
  dependencies {
55
55
  implementation "com.facebook.react:react-native:+"
56
- implementation group: 'io.gleap', name: 'gleap-android-sdk', version: '8.4.5'
56
+ implementation group: 'io.gleap', name: 'gleap-android-sdk', version: '8.4.6'
57
+
57
58
 
58
59
  if(rootProject && rootProject.ext) {
59
60
  if(rootProject.ext.targetSdkVersion == 30 || rootProject.ext.compileSdkVersion == 30) {
@@ -3,12 +3,10 @@ package com.reactnativegleapsdk;
3
3
  import android.app.Activity;
4
4
  import android.os.Build;
5
5
  import android.os.Handler;
6
-
7
6
  import androidx.annotation.NonNull;
8
7
  import androidx.annotation.RequiresApi;
9
8
 
10
9
  import com.facebook.react.ReactApplication;
11
- import com.facebook.react.bridge.LifecycleEventListener;
12
10
  import com.facebook.react.bridge.ReactApplicationContext;
13
11
  import com.facebook.react.bridge.ReactContextBaseJavaModule;
14
12
  import com.facebook.react.bridge.ReactMethod;
@@ -52,22 +50,31 @@ import io.gleap.callbacks.WidgetClosedCallback;
52
50
  import io.gleap.callbacks.WidgetOpenedCallback;
53
51
 
54
52
  @ReactModule(name = GleapsdkModule.NAME)
55
- public class GleapsdkModule extends ReactContextBaseJavaModule implements LifecycleEventListener {
53
+ public class GleapsdkModule extends ReactContextBaseJavaModule {
56
54
  public static final String NAME = "Gleapsdk";
57
55
  private boolean isSilentBugReport = false;
58
56
  private boolean invalidated = false;
59
57
 
60
58
  public GleapsdkModule(ReactApplicationContext context) {
61
59
  super(context);
60
+
62
61
  Gleap.getInstance().setGetActivityCallback(new GetActivityCallback() {
63
62
  @Override
64
63
  public Activity getActivity() {
65
64
  return context.getCurrentActivity();
66
65
  }
67
66
  });
67
+
68
+ try {
69
+ JSONObject body = new JSONObject();
70
+ body.put("page", "MainActivity");
71
+ Gleap.getInstance().trackEvent("pageView", body);
72
+ } catch (Exception ex) {
73
+ }
68
74
  }
69
75
 
70
76
 
77
+
71
78
  @Override
72
79
  @NonNull
73
80
  public String getName() {
@@ -663,7 +670,6 @@ public class GleapsdkModule extends ReactContextBaseJavaModule implements Lifecy
663
670
 
664
671
  /**
665
672
  * Frame url
666
- * 330,.
667
673
  *
668
674
  * @param frameUrl Url to the dedicated server.
669
675
  */
@@ -835,7 +841,6 @@ public class GleapsdkModule extends ReactContextBaseJavaModule implements Lifecy
835
841
  } catch (Exception e) {
836
842
  e.printStackTrace();
837
843
  }
838
-
839
844
  }
840
845
 
841
846
  /**
@@ -994,7 +999,7 @@ public class GleapsdkModule extends ReactContextBaseJavaModule implements Lifecy
994
999
 
995
1000
  private boolean checkAllowedEndings(String fileName) {
996
1001
  String[] fileType = fileName.split("\\.");
997
- String[] allowedTypes = {"jpeg", "svg", "png", "mp4", "webp", "xml", "plain", "xml", "json"};
1002
+ String[] allowedTypes = {"jpg", "jpeg", "svg", "png", "mp4", "webp", "xml", "plain", "xml", "json"};
998
1003
  if (fileType.length <= 1) {
999
1004
  return false;
1000
1005
  }
@@ -1043,18 +1048,6 @@ public class GleapsdkModule extends ReactContextBaseJavaModule implements Lifecy
1043
1048
  }
1044
1049
  }
1045
1050
 
1046
- @Override
1047
- public void onHostResume() {
1048
- }
1049
-
1050
- @Override
1051
- public void onHostPause() {
1052
- }
1053
-
1054
- @Override
1055
- public void onHostDestroy() {
1056
- }
1057
-
1058
1051
  @Override
1059
1052
  public void onCatalystInstanceDestroy() {
1060
1053
  invalidated = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-gleapsdk",
3
- "version": "8.4.3",
3
+ "version": "8.4.4",
4
4
  "description": "Know exactly why and how a bug happened. Get reports with screenshots, live action replays and all of the important metadata every time.",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",