@customerglu/react-native-customerglu 1.0.7 → 1.0.8

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.0.7"
19
+ "@customerglu/react-native-customerglu": "^1.0.8"
20
20
  ```
21
21
 
22
22
  ### Option 2
@@ -396,8 +396,7 @@ public class RncustomergluModule extends ReactContextBaseJavaModule implements L
396
396
  @ReactMethod
397
397
  public void DisplayCGNotification(ReadableMap data,Boolean autoclosewebview) {
398
398
  JSONObject jsonObject=convertMapToJson(data);
399
- int icon=getMyAppIcon(this.getReactApplicationContext());
400
- CustomerGlu.getInstance().displayCustomerGluNotification(getReactApplicationContext(),jsonObject,icon,0.5, autoclosewebview);
399
+ CustomerGlu.getInstance().displayCustomerGluNotification(getReactApplicationContext(),jsonObject,R.drawable.notification,0.5, autoclosewebview);
401
400
 
402
401
  }
403
402
  @ReactMethod
@@ -406,19 +405,6 @@ public class RncustomergluModule extends ReactContextBaseJavaModule implements L
406
405
  Log.d(TAG,"DisplayCGBackgroundNotification---"+jsonObject+" "+ autoclosewebview);
407
406
  CustomerGlu.getInstance().displayCustomerGluBackgroundNotification(getReactApplicationContext(),jsonObject,autoclosewebview);
408
407
 
409
- }
410
- public int getMyAppIcon(Context context) {
411
- final PackageManager packageManager = context.getPackageManager();
412
- final ApplicationInfo applicationInfo;
413
- int appIconResId = 0;
414
- try {
415
- applicationInfo = packageManager.getApplicationInfo(context.getPackageName(), PackageManager.GET_META_DATA);
416
- appIconResId = applicationInfo.icon;
417
-
418
- } catch (PackageManager.NameNotFoundException e) {
419
- e.printStackTrace();
420
- }
421
- return appIconResId;
422
408
  }
423
409
 
424
410
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@customerglu/react-native-customerglu",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "CustomerGlu React Native plugin",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",