@customerglu/react-native-customerglu 1.4.5 → 1.4.7-beta.0
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/README.md
CHANGED
|
@@ -16,7 +16,7 @@ Supports API 21 and above. Please ensure the minSDKVersion in the app's build.gr
|
|
|
16
16
|
### Option 1
|
|
17
17
|
Add the CustomerGlu React Native plugin in package.json file
|
|
18
18
|
```
|
|
19
|
-
"@customerglu/react-native-customerglu": "^1.4.
|
|
19
|
+
"@customerglu/react-native-customerglu": "^1.4.6"
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
### Option 2
|
package/android/.DS_Store
CHANGED
|
Binary file
|
package/android/build.gradle
CHANGED
|
@@ -61,7 +61,7 @@ repositories {
|
|
|
61
61
|
dependencies {
|
|
62
62
|
//noinspection GradleDynamicVersion
|
|
63
63
|
implementation "com.facebook.react:react-native:+" // From node_modules
|
|
64
|
-
implementation 'com.github.customerglu:CG-SDK-Android:v2.
|
|
64
|
+
implementation 'com.github.customerglu:CG-SDK-Android:v2.5.1'
|
|
65
65
|
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
|
|
66
66
|
implementation 'com.google.code.gson:gson:2.8.6'
|
|
67
67
|
implementation 'androidx.cardview:cardview:1.0.0'
|
|
@@ -70,6 +70,8 @@ public class RncustomergluModule extends ReactContextBaseJavaModule implements L
|
|
|
70
70
|
mContext = reactContext;
|
|
71
71
|
reactContext.addLifecycleEventListener(this);
|
|
72
72
|
if (!CustomerGlu.isInitialized){
|
|
73
|
+
Log.e("Receiver Register","register");
|
|
74
|
+
registerBroadcastReceiver();
|
|
73
75
|
CustomerGlu.getInstance().initializeSdk(getReactApplicationContext());
|
|
74
76
|
}
|
|
75
77
|
setPlatformAndSdkVersion();
|
|
@@ -83,10 +85,12 @@ public class RncustomergluModule extends ReactContextBaseJavaModule implements L
|
|
|
83
85
|
public void removeListeners(Integer count) {
|
|
84
86
|
}
|
|
85
87
|
|
|
88
|
+
|
|
89
|
+
|
|
86
90
|
private void setPlatformAndSdkVersion() {
|
|
87
91
|
if (CustomerGlu.getInstance() != null) {
|
|
88
92
|
|
|
89
|
-
CustomerGlu.cg_sdk_version = "1.4.
|
|
93
|
+
CustomerGlu.cg_sdk_version = "1.4.7";
|
|
90
94
|
CustomerGlu.cg_app_platform = "REACT_NATIVE";
|
|
91
95
|
}
|
|
92
96
|
}
|
|
@@ -183,7 +187,7 @@ public class RncustomergluModule extends ReactContextBaseJavaModule implements L
|
|
|
183
187
|
public void onHostResume() {
|
|
184
188
|
Log.e(TAG, "On Host Resume....");
|
|
185
189
|
CustomerGlu.getInstance().showEntryPoint(getReactApplicationContext().getCurrentActivity());
|
|
186
|
-
|
|
190
|
+
|
|
187
191
|
CustomerGlu.getInstance().setCgDeepLinkListener(new CGDeepLinkListener() {
|
|
188
192
|
@Override
|
|
189
193
|
public void onSuccess(CGConstants.CGSTATE message, DeepLinkWormholeModel.DeepLinkData deepLinkData) {
|
|
@@ -274,20 +278,14 @@ public class RncustomergluModule extends ReactContextBaseJavaModule implements L
|
|
|
274
278
|
|
|
275
279
|
@Override
|
|
276
280
|
public void onHostPause() {
|
|
277
|
-
try {
|
|
278
|
-
if (mContext != null) {
|
|
279
|
-
mContext.unregisterReceiver(mMessageReceiver);
|
|
280
|
-
}
|
|
281
281
|
|
|
282
|
-
}catch (Exception e){
|
|
283
|
-
printDebugLogs(""+e);
|
|
284
|
-
}
|
|
285
282
|
}
|
|
286
283
|
|
|
287
284
|
@Override
|
|
288
285
|
public void onHostDestroy() {
|
|
289
286
|
try {
|
|
290
287
|
if (mContext != null) {
|
|
288
|
+
Log.e("Receiver unRegister","unregister");
|
|
291
289
|
mContext.unregisterReceiver(mMessageReceiver);
|
|
292
290
|
}
|
|
293
291
|
}catch (Exception e){
|
package/ios/Rncustomerglu.swift
CHANGED
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@ DESC
|
|
|
15
15
|
s.source = { :git => "https://github.com/customerglu/CG-SDK-React-Native.git", :tag => "#{s.version}" }
|
|
16
16
|
s.source_files = "ios/**/*"
|
|
17
17
|
s.dependency "React-Core"
|
|
18
|
-
s.dependency "CustomerGlu", "2.
|
|
18
|
+
s.dependency "CustomerGlu", "2.5.2"
|
|
19
19
|
s.platform = :ios, '11.0'
|
|
20
20
|
s.swift_version = '5.0'
|
|
21
21
|
|