cordova-plugin-appice 2.1.3 → 2.1.5
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
package/plugin.xml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
|
3
|
-
id="cordova-plugin-appice" version="2.1.
|
|
3
|
+
id="cordova-plugin-appice" version="2.1.5">
|
|
4
4
|
<name>AppICE</name>
|
|
5
5
|
<description>AppICE Plugin for Cordova/PhoneGap</description>
|
|
6
6
|
<license>Commercial</license>
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
|
|
41
41
|
<podspec>
|
|
42
42
|
<pods>
|
|
43
|
-
<pod name="AppICE-IOS-SDK" spec="1.7.
|
|
43
|
+
<pod name="AppICE-IOS-SDK" spec="1.7.75" />
|
|
44
44
|
</pods>
|
|
45
45
|
</podspec>
|
|
46
46
|
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
|
|
94
94
|
<!-- Version list -->
|
|
95
95
|
<!-- FIREBASE MESSAGING VERSION-->
|
|
96
|
-
<preference name="FIREBASE_MESSAGING_VERSION" default="
|
|
96
|
+
<preference name="FIREBASE_MESSAGING_VERSION" default="24.0.0"/>
|
|
97
97
|
|
|
98
98
|
<!-- GLIDE IMAGE LOADER VERSION -->
|
|
99
99
|
<preference name="GLIDE_SDK_VERSION" default="4.12.0"/>
|
|
@@ -114,23 +114,17 @@
|
|
|
114
114
|
<preference name="WORK_MANAGER_VERSION" default="2.7.1"/>
|
|
115
115
|
|
|
116
116
|
<!-- AppICE VERSION-->
|
|
117
|
-
<preference name="APPICE_VERSION" default="2.5.
|
|
117
|
+
<preference name="APPICE_VERSION" default="2.5.81"/>
|
|
118
118
|
|
|
119
119
|
|
|
120
120
|
<!-- USES PERMISSION -->
|
|
121
121
|
<config-file target="AndroidManifest.xml" parent="/manifest">
|
|
122
122
|
<uses-permission android:name="android.permission.INTERNET"/>
|
|
123
|
-
|
|
124
|
-
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
|
|
125
|
-
<uses-permission android:name="android.permission.USE_EXACT_ALARM" />
|
|
126
123
|
</config-file>
|
|
127
124
|
|
|
128
125
|
<!-- MANIFEST ENTRIES -->
|
|
129
126
|
<config-file target="AndroidManifest.xml" parent="/manifest/application">
|
|
130
127
|
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
|
|
131
|
-
<meta-data android:name="com.semusi.analytics.appid" android:value="$APPICE_APP_ID"/>
|
|
132
|
-
<meta-data android:name="com.semusi.analytics.appkey" android:value="$APPICE_APP_KEY"/>
|
|
133
|
-
<meta-data android:name="com.semusi.analytics.apikey" android:value="$APPICE_API_KEY"/>
|
|
134
128
|
|
|
135
129
|
<service android:name="semusi.activitysdk.Api" android:exported="false" android:protectionLevel="signature"/>
|
|
136
130
|
|
|
@@ -174,6 +168,7 @@
|
|
|
174
168
|
</config-file>
|
|
175
169
|
|
|
176
170
|
<!-- CLASSES PATH -->
|
|
171
|
+
<source-file src="src/android/AppICEFCMPush.java" target-dir="com/appice/cordova/" />
|
|
177
172
|
<source-file src="src/android/AppICEPushHandler.java" target-dir="com/appice/cordova/" />
|
|
178
173
|
<source-file src="src/android/AppICEPlugin.java" target-dir="com/appice/cordova/" />
|
|
179
174
|
<source-file src="src/android/CampaignCampsReceiver.java" target-dir="com/appice/cordova/" />
|
|
@@ -192,6 +187,6 @@
|
|
|
192
187
|
<framework src= "appice.io.android:sdk:$APPICE_VERSION"/>
|
|
193
188
|
|
|
194
189
|
<!-- SCRIPT PATH -->
|
|
195
|
-
<hook type="before_build" src="scripts/BeforeAndroidBuilt.js"
|
|
190
|
+
<!-- <hook type="before_build" src="scripts/BeforeAndroidBuilt.js" />-->
|
|
196
191
|
</platform>
|
|
197
192
|
</plugin>
|
|
@@ -110,25 +110,27 @@ public class AppICEPlugin extends CordovaPlugin {
|
|
|
110
110
|
if (intent == null) return;
|
|
111
111
|
try {
|
|
112
112
|
Bundle extras = intent.getExtras();
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
113
|
+
if(extras != null) {
|
|
114
|
+
String payload = extras.getString("ai_content");
|
|
115
|
+
boolean isPushNotification = (payload != null && payload.length() > 0) ? true : false;
|
|
116
|
+
if (isPushNotification) {
|
|
117
|
+
JSONObject data = new JSONObject(payload);
|
|
118
|
+
|
|
119
|
+
final String json = "{'payload':" + data.toString() + "}";
|
|
120
|
+
System.out.println("AppICE : onNewIntent : json " + json);
|
|
121
|
+
if (statusFlag) {
|
|
122
|
+
webView.getView().post(new Runnable() {
|
|
123
|
+
@Override
|
|
124
|
+
public void run() {
|
|
125
|
+
webView.loadUrl("javascript:cordova.fireDocumentEvent('pushNotificationClicked'," + json + ");");
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
} else {
|
|
129
|
+
storeTempData(CALLBACK_CONSTANTS, json, cordova.getActivity());
|
|
130
|
+
}
|
|
130
131
|
|
|
131
|
-
|
|
132
|
+
ContextSdk.pushNotificationClicked(payload, cordova.getActivity().getApplicationContext());
|
|
133
|
+
}
|
|
132
134
|
}
|
|
133
135
|
} catch (Throwable throwable) {
|
|
134
136
|
Log.e(TAG, "onNewIntent: error ", throwable);
|
|
@@ -12,8 +12,6 @@ import android.util.Log;
|
|
|
12
12
|
import androidx.annotation.NonNull;
|
|
13
13
|
|
|
14
14
|
import com.google.firebase.messaging.RemoteMessage;
|
|
15
|
-
import com.ibm.mobilefirstplatform.clientsdk.android.push.api.MFPPushIntentService;
|
|
16
|
-
import com.ibm.mobilefirstplatform.clientsdk.android.push.internal.MFPInternalPushMessage;
|
|
17
15
|
|
|
18
16
|
import org.json.JSONObject;
|
|
19
17
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="JAVA_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
4
|
+
<exclude-output />
|
|
5
|
+
<content url="file://$MODULE_DIR$">
|
|
6
|
+
<sourceFolder url="file://$MODULE_DIR$/android" isTestSource="false" packagePrefix="org.apache.cordova.firebase" />
|
|
7
|
+
</content>
|
|
8
|
+
<orderEntry type="inheritedJdk" />
|
|
9
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
10
|
+
</component>
|
|
11
|
+
</module>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="JAVA_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
4
|
+
<exclude-output />
|
|
5
|
+
<content url="file://$MODULE_DIR$">
|
|
6
|
+
<sourceFolder url="file://$MODULE_DIR$/android" isTestSource="false" packagePrefix="org.apache.cordova.firebase" />
|
|
7
|
+
</content>
|
|
8
|
+
<orderEntry type="inheritedJdk" />
|
|
9
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
10
|
+
</component>
|
|
11
|
+
</module>
|