@customerglu/react-native-customerglu 1.0.0 → 1.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/README.md CHANGED
@@ -17,13 +17,13 @@ Android - Requires minSdkVersion should be 21
17
17
  OPTION 1 -
18
18
  Add the CustomerGlu React Native plugin in package.json file
19
19
  ```
20
- "react-native-customerglu": "^1.0.0"
20
+ "@customerglu/react-native-customerglu": "^1.0.3"
21
21
  ```
22
22
 
23
23
  OPTION 2 -
24
24
  Run this command With npm:
25
25
  ```
26
- npm install react-native-customerglu
26
+ npm install @customerglu/react-native-customerglu
27
27
  ```
28
28
 
29
29
  # Initialise CustomerGlu SDK
@@ -25,7 +25,7 @@ def safeExtGet(prop, fallback) {
25
25
  android {
26
26
  compileSdkVersion safeExtGet('Rncustomerglu_compileSdkVersion', 31)
27
27
  defaultConfig {
28
- minSdkVersion safeExtGet('Rncustomerglu_minSdkVersion', 26)
28
+ minSdkVersion safeExtGet('Rncustomerglu_minSdkVersion', 21)
29
29
  targetSdkVersion safeExtGet('Rncustomerglu_targetSdkVersion', 31)
30
30
  versionCode 1
31
31
  versionName "1.0"
@@ -62,7 +62,7 @@ dependencies {
62
62
  //noinspection GradleDynamicVersion
63
63
  implementation "com.facebook.react:react-native:+" // From node_modules
64
64
  // implementation 'com.github.customerglu:CG-SDK-Android:9be3d940f1'
65
- implementation 'com.github.customerglu:CG-SDK-Android:v2.0.7'
65
+ implementation 'com.github.customerglu:CG-SDK-Android:v2.0.11'
66
66
  // implementation 'com.github.customerglu:CG-SDK-Android:5f69d2c451'
67
67
  implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
68
68
  implementation 'com.google.code.gson:gson:2.8.6'
@@ -4,8 +4,5 @@
4
4
  <!-- only value should be changed -->
5
5
 
6
6
 
7
- <application>
8
-
9
- <receiver android:name=".RncustomergluModule" />
10
- </application>
7
+
11
8
  </manifest>
@@ -6,7 +6,7 @@ import android.util.Log;
6
6
  import android.view.View;
7
7
  import android.widget.LinearLayout;
8
8
 
9
- import com.customerglu.sdk.Banners.Banner;
9
+ import com.customerglu.sdk.entrypoints.Banner;
10
10
 
11
11
  import com.facebook.react.uimanager.ThemedReactContext;
12
12
 
@@ -35,7 +35,6 @@ public class bannerWidget extends LinearLayout {
35
35
  public void setBannerId(String id) {
36
36
  Context context1 = context.getCurrentActivity();
37
37
  banner = new Banner(context1, id);
38
-
39
38
  addView(banner);
40
39
 
41
40
  }
@@ -17,7 +17,7 @@ import androidx.annotation.Nullable;
17
17
  import androidx.annotation.RequiresApi;
18
18
  import androidx.localbroadcastmanager.content.LocalBroadcastManager;
19
19
 
20
- import com.customerglu.sdk.Banners.Banner;
20
+ import com.customerglu.sdk.entrypoints.Banner;
21
21
  import com.facebook.react.bridge.ActivityEventListener;
22
22
  import com.facebook.react.bridge.LifecycleEventListener;
23
23
  import com.facebook.react.bridge.ReactContext;
@@ -414,6 +414,8 @@ public class RncustomergluModule extends ReactContextBaseJavaModule implements L
414
414
  break;
415
415
  case Array:
416
416
  jsonObject.put(key, convertArrayToJson(readableMap.getArray(key)));
417
+ case Map:
418
+ jsonObject.put(key, convertMapToJson(readableMap.getMap(key)));
417
419
  default:
418
420
  // Do nothing and fail silently
419
421
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@customerglu/react-native-customerglu",
3
- "version": "1.0.0",
3
+ "version": "1.0.3",
4
4
  "description": "CustomerGlu React Native plugin",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -13,7 +13,7 @@
13
13
  "android",
14
14
  "ios",
15
15
  "cpp",
16
- "react-native-rncustomerglu.podspec",
16
+ "react-native-customerglu.podspec",
17
17
  "!lib/typescript/example",
18
18
  "!android/build",
19
19
  "!ios/build",
@@ -147,11 +147,9 @@
147
147
  ]
148
148
  ]
149
149
  },
150
- "dependencies": {
151
- "@applicaster/react-native-broadcast-manager": "^0.2.5"
152
- },
150
+ "dependencies": {},
153
151
  "directories": {
154
152
  "example": "example",
155
153
  "lib": "lib"
156
154
  }
157
- }
155
+ }
@@ -3,7 +3,7 @@ require "json"
3
3
  package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
4
 
5
5
  Pod::Spec.new do |s|
6
- s.name = "react-native-rncustomerglu"
6
+ s.name = "react-native-customerglu"
7
7
  s.version = package["version"]
8
8
  s.summary = package["description"]
9
9
  s.description = <<-DESC
@@ -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.0.5"
18
+ s.dependency "CustomerGlu", "2.0.6"
19
19
  s.dependency "RNFBApp"
20
20
  s.platform = :ios, '11.0'
21
21
  s.swift_version = '5.0'
@@ -1,66 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <RelativeLayout
3
- android:id="@+id/main"
4
- xmlns:android="http://schemas.android.com/apk/res/android"
5
- android:layout_width="match_parent"
6
- android:background="@color/white"
7
- android:layout_height="match_parent">
8
-
9
- <androidx.appcompat.widget.Toolbar
10
- android:id="@+id/toolbar"
11
- android:layout_width="match_parent"
12
- android:layout_height="50dp"
13
- android:layout_marginTop="10dp"
14
- >
15
- <RelativeLayout
16
-
17
- android:layout_width="match_parent"
18
- android:layout_height="wrap_content">
19
-
20
-
21
- <ImageView
22
- android:id="@+id/back"
23
- android:layout_width="35dp"
24
- android:layout_height="35dp"
25
- android:layout_centerVertical="true"
26
-
27
- android:paddingRight="10dp"
28
- android:src="@drawable/ic_back" />
29
-
30
- <TextView
31
- android:layout_width="match_parent"
32
- android:layout_height="wrap_content"
33
- android:layout_toRightOf="@+id/back"
34
- android:paddingLeft="5dp"
35
- android:text="Campaigns"
36
- android:textColor="@color/glu_black"
37
- android:textSize="24sp" />
38
-
39
- </RelativeLayout>
40
-
41
-
42
- </androidx.appcompat.widget.Toolbar>
43
- <ProgressBar
44
- android:id="@+id/pg"
45
- android:layout_width="70dp"
46
- android:layout_height="70dp"
47
- android:layout_centerInParent="true"/>
48
-
49
- <TextView
50
- android:id="@+id/label"
51
- android:visibility="gone"
52
- android:layout_width="match_parent"
53
- android:layout_height="wrap_content"
54
- android:layout_centerInParent="true"
55
- android:gravity="center"
56
- android:textColor="@color/glu_black"
57
- android:textSize="20dp"
58
- android:text="No Campaigns runnings"/>
59
-
60
- <androidx.recyclerview.widget.RecyclerView
61
- android:id="@+id/rewards"
62
- android:layout_width="match_parent"
63
- android:layout_height="wrap_content"
64
- android:layout_below="@id/toolbar" />
65
-
66
- </RelativeLayout>
@@ -1,44 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
-
3
- <androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
4
- xmlns:app="http://schemas.android.com/apk/res-auto"
5
- android:id="@+id/card"
6
- android:layout_width="match_parent"
7
- android:layout_height="match_parent"
8
- android:layout_marginEnd="10dp"
9
- android:background="@color/white"
10
- app:cardCornerRadius="5dp">
11
-
12
- <RelativeLayout
13
- android:layout_width="match_parent"
14
- android:layout_height="match_parent">
15
-
16
-
17
- <ImageView
18
- android:id="@+id/img"
19
- android:layout_width="match_parent"
20
- android:layout_height="match_parent"
21
- android:scaleType="fitXY">
22
-
23
- </ImageView>
24
-
25
- <WebView
26
- android:id="@+id/web"
27
- android:layout_width="match_parent"
28
- android:layout_height="match_parent"
29
- android:visibility="gone">
30
-
31
- <Button
32
- android:visibility="gone"
33
- android:layout_width="match_parent"
34
- android:layout_height="wrap_content"
35
- android:id="@+id/my_button"
36
- android:background="@android:color/transparent" />
37
-
38
- </WebView>
39
-
40
-
41
- </RelativeLayout>
42
-
43
-
44
- </androidx.cardview.widget.CardView>
@@ -1,14 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <RelativeLayout
3
- xmlns:android="http://schemas.android.com/apk/res/android"
4
- android:layout_width="120dp"
5
- android:layout_height="100dp">
6
-
7
- <ImageView
8
- android:layout_width="match_parent"
9
- android:layout_height="match_parent"
10
- android:scaleType="fitXY"
11
- android:id="@+id/baner"
12
- android:contentDescription="TODO" />
13
-
14
- </RelativeLayout>
@@ -1,37 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <RelativeLayout android:id="@+id/main"
3
- xmlns:android="http://schemas.android.com/apk/res/android"
4
- android:background="@color/glu_black"
5
- android:layout_width="match_parent"
6
- android:layout_height="match_parent"
7
- xmlns:app="http://schemas.android.com/apk/res-auto">
8
-
9
- <androidx.cardview.widget.CardView
10
- android:id="@+id/card"
11
- android:layout_width="match_parent"
12
- android:layout_height="200dp"
13
- android:layout_alignParentBottom="true"
14
- app:cardCornerRadius="15dp"
15
- >
16
- <RelativeLayout
17
- android:layout_width="match_parent"
18
- android:layout_height="match_parent">
19
-
20
- <WebView
21
- android:id="@+id/web_notification"
22
- android:layout_width="match_parent"
23
- android:layout_height="match_parent" />
24
-
25
- <ProgressBar
26
- android:id="@+id/pg"
27
- android:layout_width="70dp"
28
- android:layout_height="70dp"
29
- android:indeterminateDrawable="@drawable/progress_bg"
30
- android:layout_centerInParent="true"/>
31
-
32
- </RelativeLayout>
33
- </androidx.cardview.widget.CardView>
34
-
35
-
36
-
37
- </RelativeLayout>
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <RelativeLayout
3
- android:id="@+id/main"
4
- android:background="@color/glu_black"
5
- xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
6
- android:layout_height="match_parent">
7
-
8
- </RelativeLayout>
@@ -1,37 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
-
3
- <!--<androidx.cardview.widget.CardView-->
4
- <!-- xmlns:android="http://schemas.android.com/apk/res/android"-->
5
- <!-- android:layout_width="wrap_content"-->
6
- <!-- android:layout_height="wrap_content"-->
7
- <!-- android:id="@+id/card"-->
8
- <!-- xmlns:app="http://schemas.android.com/apk/res-auto"-->
9
- <!-- android:background="@color/transparent"-->
10
- <!-- app:cardCornerRadius="10dp"-->
11
- <!-- android:layout_margin="5dp"-->
12
- <!-- >-->
13
-
14
-
15
-
16
- <RelativeLayout
17
- android:id="@+id/main"
18
- xmlns:android="http://schemas.android.com/apk/res/android"
19
- xmlns:app="http://schemas.android.com/apk/res-auto"
20
- android:layout_width="match_parent"
21
- android:layout_height="120dp"
22
- android:background="@color/transparent"
23
- android:layout_marginHorizontal="5dp"
24
- >
25
-
26
- <androidx.recyclerview.widget.RecyclerView
27
- android:id="@+id/recycler"
28
- android:layout_width="match_parent"
29
- android:layout_height="match_parent" />
30
-
31
-
32
-
33
- </RelativeLayout>
34
-
35
-
36
-
37
- <!--</androidx.cardview.widget.CardView>-->
@@ -1,21 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
3
- android:layout_width="match_parent"
4
- android:layout_height="300dp"
5
- xmlns:app="http://schemas.android.com/apk/res-auto"
6
- app:cardCornerRadius="10dp">
7
-
8
- <WebView
9
- android:layout_width="match_parent"
10
- android:layout_height="match_parent"
11
- android:id="@+id/notification_web"/>
12
-
13
- <ProgressBar
14
- android:id="@+id/pg"
15
- android:layout_width="70dp"
16
- android:layout_height="70dp"
17
- android:indeterminateDrawable="@drawable/progress_bg"
18
- android:layout_centerInParent="true"/>
19
-
20
-
21
- </androidx.cardview.widget.CardView>
@@ -1,11 +0,0 @@
1
- <merge xmlns:android="http://schemas.android.com/apk/res/android">
2
-
3
-
4
- <ImageView
5
- android:id="@+id/floating_img"
6
- android:layout_width="wrap_content"
7
- android:scaleType="fitXY"
8
- android:layout_height="wrap_content" />
9
-
10
-
11
- </merge>
@@ -1,17 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
- android:layout_width="70dp"
4
- android:layout_height="70dp"
5
- android:focusableInTouchMode="true">
6
-
7
-
8
-
9
- <ImageView
10
- android:id="@+id/floating_img"
11
- android:layout_width="150dp"
12
- android:layout_height="50dp"
13
- android:src="@drawable/ij"
14
- android:scaleType="fitXY"
15
- />
16
-
17
- </RelativeLayout>
@@ -1,21 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <RelativeLayout
3
- xmlns:android="http://schemas.android.com/apk/res/android"
4
- android:layout_width="match_parent"
5
- android:layout_height="200dp">
6
-
7
-
8
- <WebView
9
- android:id="@+id/web"
10
- android:layout_width="match_parent"
11
- android:layout_height="match_parent" />
12
-
13
- <ProgressBar
14
- android:id="@+id/pg"
15
- android:layout_width="70dp"
16
- android:layout_height="70dp"
17
- android:indeterminateDrawable="@drawable/progress_bg"
18
- android:layout_centerInParent="true"/>
19
-
20
-
21
- </RelativeLayout>
@@ -1,10 +0,0 @@
1
- <merge xmlns:android="http://schemas.android.com/apk/res/android">
2
-
3
- <androidx.recyclerview.widget.RecyclerView
4
- android:id="@+id/recycler"
5
- android:layout_width="wrap_content"
6
- android:layout_height="wrap_content"
7
- android:layout_margin="5dp" />
8
-
9
-
10
- </merge>
@@ -1,42 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
-
3
-
4
- <RelativeLayout android:id="@+id/main"
5
- xmlns:android="http://schemas.android.com/apk/res/android"
6
- android:background="@color/glu_black"
7
- android:layout_width="match_parent"
8
- android:layout_height="match_parent"
9
- xmlns:app="http://schemas.android.com/apk/res-auto">
10
-
11
-
12
- <androidx.cardview.widget.CardView
13
- android:id="@+id/card"
14
- android:layout_width="match_parent"
15
- android:layout_height="match_parent"
16
- android:elevation="10dp"
17
- app:cardCornerRadius="20dp">
18
- <RelativeLayout
19
- android:layout_width="match_parent"
20
- android:layout_height="match_parent">
21
-
22
- <WebView
23
- android:id="@+id/web_notification"
24
- android:layout_width="match_parent"
25
- android:layout_height="match_parent" />
26
- <ProgressBar
27
- android:id="@+id/pg"
28
- android:layout_width="70dp"
29
- android:layout_height="70dp"
30
- android:layout_centerInParent="true"
31
- android:indeterminateDrawable="@drawable/progress_bg" />
32
-
33
- </RelativeLayout>
34
- </androidx.cardview.widget.CardView>
35
-
36
-
37
-
38
-
39
-
40
-
41
-
42
- </RelativeLayout>
@@ -1,31 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
-
3
- <androidx.cardview.widget.CardView
4
- xmlns:android="http://schemas.android.com/apk/res/android"
5
- android:layout_width="match_parent"
6
- android:layout_height="150dp"
7
- xmlns:app="http://schemas.android.com/apk/res-auto"
8
- android:background="@color/white"
9
- app:cardCornerRadius="10dp"
10
- android:layout_margin="10dp">
11
-
12
- <RelativeLayout
13
- android:layout_width="match_parent"
14
- android:layout_height="match_parent">
15
-
16
- <ImageView
17
- android:id="@+id/img"
18
- android:layout_width="match_parent"
19
- android:layout_height="match_parent"
20
- android:contentDescription="TODO"
21
- android:scaleType="fitXY"
22
- >
23
-
24
- </ImageView>
25
-
26
-
27
- </RelativeLayout>
28
-
29
-
30
-
31
- </androidx.cardview.widget.CardView>
@@ -1,43 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
- android:layout_width="match_parent"
4
- android:layout_height="match_parent"
5
- xmlns:app="http://schemas.android.com/apk/res-auto">
6
-
7
- <WebView
8
- android:id="@+id/web"
9
- android:layout_width="match_parent"
10
- android:layout_height="match_parent" />
11
-
12
- <!-- <androidx.appcompat.widget.Toolbar-->
13
- <!-- android:id="@+id/toolbar"-->
14
- <!-- android:layout_width="match_parent"-->
15
- <!-- android:layout_height="50dp">-->
16
- <!-- <RelativeLayout-->
17
- <!-- android:background="@color/white"-->
18
- <!-- android:layout_width="match_parent"-->
19
- <!-- android:layout_height="wrap_content">-->
20
-
21
-
22
- <!-- <ImageView-->
23
- <!-- android:id="@+id/back"-->
24
- <!-- android:layout_width="35dp"-->
25
- <!-- android:layout_height="35dp"-->
26
- <!-- android:layout_centerVertical="true"-->
27
-
28
- <!-- android:src="@drawable/ic_back" />-->
29
-
30
-
31
- <!-- </RelativeLayout>-->
32
-
33
-
34
- <!-- </androidx.appcompat.widget.Toolbar>-->
35
-
36
- <ProgressBar
37
- android:id="@+id/pg"
38
- android:layout_width="70dp"
39
- android:layout_height="70dp"
40
- android:layout_centerInParent="true"/>
41
-
42
-
43
- </RelativeLayout>