cordova-plugin-mserviceinterface-2.0 1.0.69 → 1.0.71

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cordova-plugin-mserviceinterface-2.0",
3
- "version": "1.0.69",
3
+ "version": "1.0.71",
4
4
  "description": "This plugin establishes the connection to the native interface and performs the requested task.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -19,10 +19,9 @@
19
19
  "url": "https://github.com/selfservit/cordova-plugin-mserviceinterface-2.0/issues"
20
20
  },
21
21
  "homepage": "https://github.com/selfservit/cordova-plugin-mserviceinterface-2.0#readme",
22
- "engines": [
23
- {
22
+ "engines": [{
24
23
  "name": "cordova",
25
24
  "version": ">=5.0.0"
26
25
  }
27
26
  ]
28
- }
27
+ }
package/plugin.xml CHANGED
@@ -2,7 +2,7 @@
2
2
  <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
3
3
  xmlns:android="http://schemas.android.com/apk/res/android"
4
4
  id="cordova-plugin-mserviceinterface-2.0"
5
- version="1.0.69">
5
+ version="1.0.71">
6
6
  <name>mserviceinterface-2.0</name>
7
7
  <description>This plugin establishes the connection to the native interface and performs the requested task.</description>
8
8
  <author>selfservit@gmail.com</author>
@@ -25,10 +25,6 @@
25
25
  <framework src="com.google.zxing:core:3.3.2" />
26
26
  <framework src="com.journeyapps:zxing-android-embedded:3.6.0@aar" />
27
27
  <framework src="id.zelory:compressor:2.1.1" />
28
- <edit-config xmlns:android="http://schemas.android.com/apk/res/android" file="AndroidManifest.xml" mode="merge" target="/manifest/application">
29
- <application android:networkSecurityConfig="@xml/network_security_config" />
30
- <application android:requestLegacyExternalStorage="true" />
31
- </edit-config>
32
28
  <config-file target="res/xml/config.xml" parent="/*">
33
29
  <feature name="mInterface" >
34
30
  <param name="android-package" value="com.selfservit.util.mInterface"/>
@@ -45,50 +45,7 @@ public class backgroundNotification implements OneSignal.OSRemoteNotificationRec
45
45
  String key = msgBody.getString("key");
46
46
  String subKey = msgBody.getString("subKey");
47
47
 
48
- if (scrID.contains("_chat")) {
49
- if (!subKey.equals("")) {
50
- fileDirectory = new File(mInterfaceUtil.rootDirectory + "/" + baseDirectory[(baseDirectory.length - 1)] + "/" + clientID + "/" + countryCode + "/" + "content_store" + "/" + "msvMsg" + "/" + "history" + "/" + packageName + "/" + key + "/" + subKey);
51
- if (!fileDirectory.exists()) {
52
- boolean success = fileDirectory.mkdirs();
53
- if (!success) {
54
- System.out.println("Directory not created");
55
- }
56
- }
57
- notificationsFile = new File(fileDirectory, subKey + ".txt");
58
-
59
-
60
- // Check if the specified file Exists or not
61
- if (notificationsFile.exists()) {
62
- System.out.println("Exists");
63
- try {
64
- FileReader fr = new FileReader(notificationsFile);
65
- BufferedReader bufferedReader = new BufferedReader(fr);
66
- StringBuilder notificationDatas = new StringBuilder();
67
- String line;
68
- while ((line = bufferedReader.readLine()) != null) {
69
- notificationDatas.append(line);
70
- System.out.println(line);
71
- }
72
- String notificationStr = decrypt(notificationDatas.toString());
73
- notificationStr = notificationStr + "," + msgBody.toString();
74
- FileWriter fw = new FileWriter(notificationsFile);
75
- fw.write(mInterfaceUtil.encrypt(notificationStr));
76
- fw.close();
77
- } catch (Exception e) {
78
- e.printStackTrace();
79
- }
80
- } else {
81
- System.out.println("Does not Exists");
82
- try {
83
- FileWriter fw = new FileWriter(notificationsFile);
84
- fw.write(mInterfaceUtil.encrypt("," + notification.getAdditionalData().getString("msgBody")));
85
- fw.close();
86
- } catch (IOException | JSONException e1) {
87
- e1.printStackTrace();
88
- }
89
- }
90
- }
91
- } else {
48
+ if (!scrID.contains("_chat")) {
92
49
  fileDirectory = new File(mInterfaceUtil.rootDirectory + "/" + baseDirectory[(baseDirectory.length - 1)] + "/" + clientID + "/" + countryCode + "/" + "notifications" + "/" + "unread");
93
50
  if (!fileDirectory.exists()) {
94
51
  boolean success = fileDirectory.mkdirs();
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <network-security-config>
3
- <base-config cleartextTrafficPermitted="true">
4
- <trust-anchors>
5
- <certificates src="system" />
6
- </trust-anchors>
7
- </base-config>
8
- </network-security-config>