@metrixorg/react-native-plugin 2.2.13 → 2.2.14

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.
@@ -38,9 +38,9 @@ rootProject.allprojects {
38
38
  dependencies {
39
39
  implementation 'com.facebook.react:react-native:+'
40
40
 
41
- implementation 'ir.metrix.analytics:metrix-reactnative:2.2.13'
42
- implementation 'ir.metrix.attribution:metrix-reactnative:2.2.13'
41
+ implementation 'ir.metrix.analytics:metrix-reactnative:2.2.14'
42
+ implementation 'ir.metrix.attribution:metrix-reactnative:2.2.14'
43
43
  if (project.ext.notificationEnabled) {
44
- api 'ir.metrix.notification:metrix-reactnative:2.2.13'
44
+ api 'ir.metrix.notification:metrix-reactnative:2.2.14'
45
45
  }
46
46
  }
@@ -196,7 +196,10 @@ public class MetrixModule extends ReactContextBaseJavaModule {
196
196
 
197
197
  @ReactMethod
198
198
  public void loadInAppMessages() {
199
- ir.metrix.notification.MetrixNotification.loadInAppMessages();
199
+ ir.metrix.reactnative.Reflection.invokeStaticMethod(
200
+ "ir.metrix.notification.MetrixNotification",
201
+ "loadInAppMessages"
202
+ );
200
203
  }
201
204
 
202
205
  @ReactMethod
@@ -0,0 +1,12 @@
1
+ package ir.metrix.reactnative;
2
+
3
+ import java.lang.reflect.Method;
4
+
5
+ public class Reflection {
6
+
7
+ public static Object invokeStaticMethod(String className, String methodName) throws Exception {
8
+ Class<?> clazz = Class.forName(className);
9
+ Method method = clazz.getDeclaredMethod(methodName);
10
+ return method.invoke(null);
11
+ }
12
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metrixorg/react-native-plugin",
3
- "version": "2.2.13",
3
+ "version": "2.2.14",
4
4
  "description": "Metrix React native plugin",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -8,7 +8,7 @@
8
8
  "deploy": "git checkout master && git pull && git merge develop",
9
9
  "major": "2",
10
10
  "minor": "2",
11
- "patch": "13"
11
+ "patch": "14"
12
12
  },
13
13
  "author": "Metrix",
14
14
  "license": "Apache 2.0",