@metrixorg/react-native-plugin 2.0.1 → 2.0.3
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/android/build.gradle
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
apply plugin: 'com.android.library'
|
|
2
2
|
|
|
3
|
+
def Properties gradleProperties = new Properties()
|
|
4
|
+
gradleProperties.load(rootProject.rootProject.file("gradle.properties").newDataInputStream())
|
|
5
|
+
|
|
6
|
+
project.ext {
|
|
7
|
+
notificationEnabled = gradleProperties.getProperty("metrix.notificatoin.enable", "false").toBoolean()
|
|
8
|
+
}
|
|
3
9
|
|
|
4
10
|
android {
|
|
5
11
|
compileSdkVersion 31
|
|
@@ -34,5 +40,7 @@ dependencies {
|
|
|
34
40
|
|
|
35
41
|
implementation 'ir.metrix.analytics:metrix-reactnative:2.0.0.beta8'
|
|
36
42
|
implementation 'ir.metrix.attribution:metrix-reactnative:2.0.0.beta8'
|
|
37
|
-
|
|
43
|
+
if (project.ext.notificationEnabled) {
|
|
44
|
+
api 'ir.metrix.notification:metrix-reactnative:2.0.0.beta8'
|
|
45
|
+
}
|
|
38
46
|
}
|
|
@@ -170,8 +170,8 @@ public class MetrixModule extends ReactContextBaseJavaModule {
|
|
|
170
170
|
}
|
|
171
171
|
|
|
172
172
|
@ReactMethod
|
|
173
|
-
public void setUserBirthday(
|
|
174
|
-
ir.metrix.analytics.MetrixAnalytics.User.setBirthday(birthday.longValue());
|
|
173
|
+
public void setUserBirthday(double birthday) {
|
|
174
|
+
ir.metrix.analytics.MetrixAnalytics.User.setBirthday(Double.valueOf(birthday).longValue());
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
@ReactMethod
|
package/index.js
CHANGED
|
@@ -254,11 +254,11 @@ function getGender(gender) {
|
|
|
254
254
|
let g = null;
|
|
255
255
|
|
|
256
256
|
if (gender === 2) {
|
|
257
|
-
g = "
|
|
257
|
+
g = "MALE";
|
|
258
258
|
} else if (gender === 1) {
|
|
259
|
-
g = "
|
|
259
|
+
g = "FEMALE";
|
|
260
260
|
} else {
|
|
261
|
-
g = "
|
|
261
|
+
g = "OTHER";
|
|
262
262
|
}
|
|
263
263
|
|
|
264
264
|
return g;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metrixorg/react-native-plugin",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
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": "0",
|
|
11
|
-
"patch": "
|
|
11
|
+
"patch": "3"
|
|
12
12
|
},
|
|
13
13
|
"author": "Metrix",
|
|
14
14
|
"license": "Apache 2.0",
|