react-native-notifyvisitors 4.1.5 → 4.1.7
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 +5 -26
- package/android/src/main/AndroidManifest.xml +4 -16
- package/android/src/main/java/com/rn_notifyvisitors/RNNotifyvisitorsModule.java +49 -9
- package/ios/RNNotifyvisitors/RNNotifyvisitors.m +1 -1
- package/ios/RNNotifyvisitors.xcodeproj/project.pbxproj +8 -8
- package/ios/RNNotifyvisitors.xcodeproj/project.xcworkspace/xcuserdata/neeraj.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/{libnotifyvisitors_6_3_2.a → libnotifyvisitors_6_3_2_1.a} +0 -0
- package/package.json +1 -1
- package/react-native-notifyvisitors.podspec +1 -1
package/android/build.gradle
CHANGED
|
@@ -5,46 +5,25 @@ buildscript {
|
|
|
5
5
|
google()
|
|
6
6
|
mavenCentral()
|
|
7
7
|
}
|
|
8
|
-
|
|
9
|
-
dependencies {
|
|
10
|
-
classpath 'com.android.tools.build:gradle:3.5.3'
|
|
11
|
-
//classpath 'com.google.gms:google-services:4.3.3'
|
|
12
|
-
}
|
|
13
8
|
}
|
|
14
9
|
|
|
15
|
-
|
|
16
10
|
android {
|
|
17
|
-
|
|
11
|
+
compileSdk 31
|
|
18
12
|
defaultConfig {
|
|
19
13
|
minSdkVersion 19
|
|
20
14
|
targetSdkVersion 31
|
|
21
15
|
}
|
|
22
|
-
lintOptions {
|
|
23
|
-
abortOnError false
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
repositories {
|
|
28
|
-
mavenCentral()
|
|
29
16
|
}
|
|
30
17
|
|
|
31
18
|
dependencies {
|
|
32
19
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
33
20
|
implementation 'com.facebook.react:react-native:+'
|
|
21
|
+
implementation 'com.notifyvisitors.notifyvisitors:notifyvisitors:5.3.6'
|
|
34
22
|
|
|
35
|
-
implementation 'com.
|
|
36
|
-
implementation '
|
|
37
|
-
implementation '
|
|
38
|
-
implementation 'com.google.android.material:material:1.4.0'
|
|
39
|
-
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
|
40
|
-
implementation 'androidx.cardview:cardview:1.0.0'
|
|
41
|
-
implementation 'com.android.installreferrer:installreferrer:2.1'
|
|
42
|
-
implementation 'com.google.android.play:core:1.10.1'
|
|
43
|
-
|
|
44
|
-
implementation 'com.google.android.gms:play-services-location:17.0.0'
|
|
23
|
+
implementation platform('com.google.firebase:firebase-bom:30.3.1')
|
|
24
|
+
implementation ('com.google.firebase:firebase-messaging')
|
|
25
|
+
implementation ('com.google.android.gms:play-services-location')
|
|
45
26
|
implementation 'com.google.firebase:firebase-core:17.2.2'
|
|
46
|
-
implementation 'com.google.firebase:firebase-messaging:20.1.0'
|
|
47
27
|
}
|
|
48
28
|
|
|
49
|
-
//apply plugin: 'com.google.gms.google-services'
|
|
50
29
|
|
|
@@ -1,28 +1,16 @@
|
|
|
1
|
-
|
|
2
1
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
-
|
|
2
|
+
package="com.rn_notifyvisitors">
|
|
4
3
|
|
|
5
4
|
<uses-permission android:name="android.permission.INTERNET" />
|
|
6
5
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
|
7
|
-
|
|
8
|
-
<
|
|
9
|
-
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
|
|
10
|
-
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
|
|
11
|
-
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
|
12
|
-
|
|
13
|
-
<application
|
|
14
|
-
android:allowBackup="false"
|
|
15
|
-
android:label="@string/app_name"
|
|
16
|
-
android:usesCleartextTraffic="true"
|
|
17
|
-
android:largeHeap="true"
|
|
18
|
-
android:supportsRtl="true">
|
|
6
|
+
|
|
7
|
+
<application>
|
|
19
8
|
<service
|
|
20
9
|
android:name="com.notifyvisitors.notifyvisitors.NVFirebaseMessagingService"
|
|
21
10
|
android:exported="true">
|
|
22
11
|
<intent-filter>
|
|
23
12
|
<action android:name="com.google.firebase.MESSAGING_EVENT" />
|
|
24
13
|
</intent-filter>
|
|
25
|
-
</service>
|
|
14
|
+
</service>
|
|
26
15
|
</application>
|
|
27
16
|
</manifest>
|
|
28
|
-
|
|
@@ -40,7 +40,7 @@ public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implement
|
|
|
40
40
|
|
|
41
41
|
private final ReactApplicationContext reactContext;
|
|
42
42
|
private static final String TAG = "RN-NotifyVisitors";
|
|
43
|
-
private static final String PLUGIN_VERSION = "4.1.
|
|
43
|
+
private static final String PLUGIN_VERSION = "4.1.7";
|
|
44
44
|
|
|
45
45
|
private String PUSH_BANNER_CLICK_EVENT = "nv_push_banner_click";
|
|
46
46
|
private String CHAT_BOT_BUTTON_CLICK = "nv_chat_bot_button_click";
|
|
@@ -152,13 +152,24 @@ public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implement
|
|
|
152
152
|
Log.i(TAG, "CUSTOM-OBJECT PARSE ERROR : " + e);
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
+
try {
|
|
156
|
+
if (mTokens != null) {
|
|
157
|
+
Log.i(TAG, "Tokens : " + mTokens.toString());
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
if (mCustomObjects != null) {
|
|
161
|
+
Log.i(TAG, "Custom Rules : " + mCustomObjects.toString());
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
} catch (Exception e) {
|
|
165
|
+
Log.i(TAG, "ERROR : " + e);
|
|
166
|
+
}
|
|
167
|
+
|
|
155
168
|
mActivity = reactContext.getCurrentActivity();
|
|
156
169
|
if (mActivity != null) {
|
|
157
170
|
mActivity.runOnUiThread(new Runnable() {
|
|
158
171
|
@Override
|
|
159
172
|
public void run() {
|
|
160
|
-
Log.i(TAG, "Tokens : "+mTokens.toString());
|
|
161
|
-
Log.i(TAG, "Custom Rules : "+mCustomObjects.toString());
|
|
162
173
|
NotifyVisitorsApi.getInstance(mActivity).show(mTokens, mCustomObjects, fragmentName);
|
|
163
174
|
}
|
|
164
175
|
});
|
|
@@ -333,10 +344,29 @@ public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implement
|
|
|
333
344
|
Log.i(TAG, "ATTRIBUTES PARSE ERROR : " + e);
|
|
334
345
|
}
|
|
335
346
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
347
|
+
if (eventName != null) {
|
|
348
|
+
Log.i(TAG, "Event Name : " + eventName);
|
|
349
|
+
} else {
|
|
350
|
+
Log.i(TAG, "Event Name : null");
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
if (mAttributes != null) {
|
|
354
|
+
Log.i(TAG, "Attributes : " + mAttributes.toString());
|
|
355
|
+
} else {
|
|
356
|
+
Log.i(TAG, "Attributes : null");
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
if (ltv != null) {
|
|
360
|
+
Log.i(TAG, "Life Time Value : " + ltv);
|
|
361
|
+
} else {
|
|
362
|
+
Log.i(TAG, "Life Time Value : null");
|
|
363
|
+
}
|
|
364
|
+
if (scope != null) {
|
|
365
|
+
Log.i(TAG, "Scope : " + scope);
|
|
366
|
+
} else {
|
|
367
|
+
Log.i(TAG, "Scope : null");
|
|
368
|
+
}
|
|
369
|
+
|
|
340
370
|
NotifyVisitorsApi.getInstance(reactContext).event(eventName, mAttributes, ltv, scope);
|
|
341
371
|
} catch (Exception e) {
|
|
342
372
|
Log.i(TAG, "EVENT ERROR : " + e);
|
|
@@ -355,8 +385,18 @@ public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implement
|
|
|
355
385
|
mAttributes = new JSONObject(temp);
|
|
356
386
|
}
|
|
357
387
|
|
|
358
|
-
|
|
359
|
-
|
|
388
|
+
if (userID != null) {
|
|
389
|
+
Log.i(TAG, "User : " + userID);
|
|
390
|
+
} else {
|
|
391
|
+
Log.i(TAG, "User : null");
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
if (mAttributes != null) {
|
|
395
|
+
Log.i(TAG, "Attributes : " + mAttributes);
|
|
396
|
+
} else {
|
|
397
|
+
Log.i(TAG, "Attributes : null");
|
|
398
|
+
}
|
|
399
|
+
|
|
360
400
|
NotifyVisitorsApi.getInstance(reactContext).userIdentifier(userID, mAttributes);
|
|
361
401
|
} catch (Exception e) {
|
|
362
402
|
Log.i(TAG, "USER IDENTIFIER ERROR : " + e);
|
|
@@ -32,7 +32,7 @@ int nvCheckPushClickTimeCounter = 0;
|
|
|
32
32
|
|
|
33
33
|
+(void)Initialize{
|
|
34
34
|
NSLog(@"RN-NotifyVisitors : INITIALIZE !!");
|
|
35
|
-
NSLog(@"RN-NotifyVisitors PLUGIN VERSION : 4.1.
|
|
35
|
+
NSLog(@"RN-NotifyVisitors PLUGIN VERSION : 4.1.7 !!");
|
|
36
36
|
NSString *nvMode = nil;
|
|
37
37
|
#if DEBUG
|
|
38
38
|
nvMode = @"debug";
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
objects = {
|
|
8
8
|
|
|
9
9
|
/* Begin PBXBuildFile section */
|
|
10
|
-
|
|
10
|
+
07B74A212912A29A00CF69CD /* libnotifyvisitors_6_3_2_1.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 07B74A202912A29A00CF69CD /* libnotifyvisitors_6_3_2_1.a */; };
|
|
11
11
|
138AE09F22A7ACA600F403E1 /* RNNVExtensionService.m in Sources */ = {isa = PBXBuildFile; fileRef = 138AE09E22A7ACA600F403E1 /* RNNVExtensionService.m */; };
|
|
12
12
|
13B25F2D22BA35B000C4D0B7 /* RCTNVEventEmitter.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B25F2C22BA35B000C4D0B7 /* RCTNVEventEmitter.m */; };
|
|
13
13
|
B3E7B58A1CC2AC0600A0062D /* RNNotifyvisitors.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* RNNotifyvisitors.m */; };
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
/* End PBXCopyFilesBuildPhase section */
|
|
28
28
|
|
|
29
29
|
/* Begin PBXFileReference section */
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
07B74A202912A29A00CF69CD /* libnotifyvisitors_6_3_2_1.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libnotifyvisitors_6_3_2_1.a; sourceTree = "<group>"; };
|
|
31
|
+
07B74A222912A2A200CF69CD /* notifyvisitors.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = notifyvisitors.h; sourceTree = "<group>"; };
|
|
32
|
+
07B74A232912A2B400CF69CD /* nvResourceValues.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = nvResourceValues.plist; sourceTree = "<group>"; };
|
|
33
33
|
134814201AA4EA6300B7C361 /* libRNNotifyvisitors.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNNotifyvisitors.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
34
34
|
138AE09D22A7ACA600F403E1 /* RNNVExtensionService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNVExtensionService.h; sourceTree = "<group>"; };
|
|
35
35
|
138AE09E22A7ACA600F403E1 /* RNNVExtensionService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNVExtensionService.m; sourceTree = "<group>"; };
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
buildActionMask = 2147483647;
|
|
57
57
|
files = (
|
|
58
58
|
DC31F4E523BC9CC900AAB2DB /* SystemConfiguration.framework in Frameworks */,
|
|
59
|
-
|
|
59
|
+
07B74A212912A29A00CF69CD /* libnotifyvisitors_6_3_2_1.a in Frameworks */,
|
|
60
60
|
);
|
|
61
61
|
runOnlyForDeploymentPostprocessing = 0;
|
|
62
62
|
};
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
253C98EC26411B0A00F2E8C9 /* Assets */ = {
|
|
75
75
|
isa = PBXGroup;
|
|
76
76
|
children = (
|
|
77
|
-
|
|
77
|
+
07B74A232912A2B400CF69CD /* nvResourceValues.plist */,
|
|
78
78
|
25A29B6F26829CBC00098B92 /* empty.png */,
|
|
79
79
|
25A29B6B26829CBB00098B92 /* nv_deleteIcon.png */,
|
|
80
80
|
25A29B6D26829CBB00098B92 /* nv_deleteIcon@2x.png */,
|
|
@@ -92,8 +92,8 @@
|
|
|
92
92
|
58B511D21A9E6C8500147676 = {
|
|
93
93
|
isa = PBXGroup;
|
|
94
94
|
children = (
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
07B74A222912A2A200CF69CD /* notifyvisitors.h */,
|
|
96
|
+
07B74A202912A29A00CF69CD /* libnotifyvisitors_6_3_2_1.a */,
|
|
97
97
|
253C98EC26411B0A00F2E8C9 /* Assets */,
|
|
98
98
|
DC4962D123BE131B005E63F5 /* RNNotifyvisitors */,
|
|
99
99
|
134814211AA4EA7D00B7C361 /* Products */,
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED