@customerglu/react-native-customerglu 2.0.3 → 2.0.4

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.
@@ -23,6 +23,7 @@ def safeExtGet(prop, fallback) {
23
23
  }
24
24
 
25
25
  android {
26
+ namespace 'com.reactnativerncustomerglu'
26
27
  compileSdkVersion safeExtGet('Rncustomerglu_compileSdkVersion', 34)
27
28
  defaultConfig {
28
29
  minSdkVersion safeExtGet('Rncustomerglu_minSdkVersion', 21)
@@ -61,7 +62,7 @@ repositories {
61
62
  dependencies {
62
63
  //noinspection GradleDynamicVersion
63
64
  implementation "com.facebook.react:react-native:+" // From node_modules
64
- implementation 'com.customerglu:CustomerGluLibrary:3.0.2'
65
+ implementation 'com.customerglu:CustomerGluLibrary:3.0.4'
65
66
  implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
66
67
  implementation 'com.google.code.gson:gson:2.8.6'
67
68
  implementation 'androidx.cardview:cardview:1.0.0'
@@ -3,6 +3,7 @@ package com.reactnativerncustomerglu;
3
3
  import static com.customerglu.sdk.Utils.Comman.printDebugLogs;
4
4
  import static com.facebook.react.bridge.UiThreadUtil.runOnUiThread;
5
5
 
6
+ import android.annotation.SuppressLint;
6
7
  import android.content.BroadcastReceiver;
7
8
  import android.content.Context;
8
9
  import android.content.Intent;
@@ -154,13 +155,15 @@ public class RncustomergluModule extends ReactContextBaseJavaModule implements L
154
155
 
155
156
  };
156
157
 
158
+ @SuppressLint("WrongConstant")
157
159
  private void registerBroadcastReceiver() {
158
160
  try {
159
161
 
160
- mContext.registerReceiver(mMessageReceiver, new IntentFilter("CUSTOMERGLU_ANALYTICS_EVENT"));
161
- mContext.registerReceiver(mMessageReceiver, new IntentFilter("CUSTOMERGLU_DEEPLINK_EVENT"));
162
- mContext.registerReceiver(mMessageReceiver, new IntentFilter("CUSTOMERGLU_BANNER_LOADED"));
163
- mContext.registerReceiver(mMessageReceiver, new IntentFilter("CG_INVALID_CAMPAIGN_ID"));
162
+ ContextCompat.registerReceiver(mContext, mMessageReceiver, new IntentFilter("CUSTOMERGLU_DEEPLINK_EVENT"), ContextCompat.RECEIVER_EXPORTED);
163
+ ContextCompat.registerReceiver(mContext, mMessageReceiver, new IntentFilter("CUSTOMERGLU_ANALYTICS_EVENT"), ContextCompat.RECEIVER_EXPORTED);
164
+ ContextCompat.registerReceiver(mContext, mMessageReceiver, new IntentFilter("CUSTOMERGLU_BANNER_LOADED"), ContextCompat.RECEIVER_EXPORTED);
165
+ ContextCompat.registerReceiver(mContext, mMessageReceiver, new IntentFilter("CG_INVALID_CAMPAIGN_ID"), ContextCompat.RECEIVER_EXPORTED);
166
+
164
167
  }catch (Exception e){
165
168
  printDebugLogs(""+e);
166
169
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@customerglu/react-native-customerglu",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "CustomerGlu React Native plugin",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -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", "3.0.3"
18
+ s.dependency "CustomerGlu", "3.0.4"
19
19
  s.platform = :ios, '13.0'
20
20
  s.swift_version = '5.0'
21
21
 
File without changes