pushwoosh-cordova-plugin 8.3.20 → 8.3.22
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 +3 -3
- package/README_PGB.md +1 -1
- package/build-extras-pushwoosh.gradle +0 -1
- package/package.json +1 -1
- package/plugin.xml +10 -10
- package/src/android/src/com/pushwoosh/plugin/pushnotifications/PushNotifications.java +14 -0
- package/src/ios/PushNotification.m +11 -0
- package/www/PushNotification.js +12 -0
package/README.md
CHANGED
|
@@ -14,13 +14,13 @@ Cross-Platform push notifications by Pushwoosh for Cordova / PhoneGap
|
|
|
14
14
|
Using npm (requires cordova 7.0+):
|
|
15
15
|
|
|
16
16
|
```
|
|
17
|
-
cordova plugin add pushwoosh-cordova-plugin@8.3.
|
|
17
|
+
cordova plugin add pushwoosh-cordova-plugin@8.3.22
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
Using git:
|
|
21
21
|
|
|
22
22
|
```
|
|
23
|
-
cordova plugin add https://github.com/Pushwoosh/pushwoosh-phonegap-plugin.git#8.3.
|
|
23
|
+
cordova plugin add https://github.com/Pushwoosh/pushwoosh-phonegap-plugin.git#8.3.22
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
#### Phonegap
|
|
@@ -28,7 +28,7 @@ cordova plugin add https://github.com/Pushwoosh/pushwoosh-phonegap-plugin.git#8.
|
|
|
28
28
|
Using npm (requires phonegap 7.1+):
|
|
29
29
|
|
|
30
30
|
```
|
|
31
|
-
cordova plugin add pushwoosh-cordova-plugin@8.3.
|
|
31
|
+
cordova plugin add pushwoosh-cordova-plugin@8.3.22
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
### Guide
|
package/README_PGB.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pushwoosh-cordova-plugin",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.22",
|
|
4
4
|
"description": "\n This plugin allows you to send and receive push notifications. Powered by Pushwoosh (www.pushwoosh.com).\n ",
|
|
5
5
|
"main":"www/PushNotification.js",
|
|
6
6
|
"typings":"types/index.d.ts",
|
package/plugin.xml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android" id="pushwoosh-cordova-plugin" version="8.3.
|
|
2
|
+
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android" id="pushwoosh-cordova-plugin" version="8.3.22">
|
|
3
3
|
|
|
4
4
|
<name>Pushwoosh</name>
|
|
5
5
|
|
|
@@ -77,13 +77,13 @@
|
|
|
77
77
|
<framework src="com.github.bumptech.glide:glide:4.10.0" />
|
|
78
78
|
<framework src="org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.60" />
|
|
79
79
|
|
|
80
|
-
<framework src="com.pushwoosh:pushwoosh:6.7.
|
|
81
|
-
<framework src="com.pushwoosh:pushwoosh-amazon:6.7.
|
|
82
|
-
<framework src="com.pushwoosh:pushwoosh-firebase:6.7.
|
|
83
|
-
<framework src="com.pushwoosh:pushwoosh-badge:6.7.
|
|
84
|
-
<framework src="com.pushwoosh:pushwoosh-inbox:6.7.
|
|
85
|
-
<framework src="com.pushwoosh:pushwoosh-inbox-ui:6.7.
|
|
86
|
-
<framework src="com.pushwoosh:pushwoosh-huawei:6.7.
|
|
80
|
+
<framework src="com.pushwoosh:pushwoosh:6.7.3"/>
|
|
81
|
+
<framework src="com.pushwoosh:pushwoosh-amazon:6.7.3"/>
|
|
82
|
+
<framework src="com.pushwoosh:pushwoosh-firebase:6.7.3"/>
|
|
83
|
+
<framework src="com.pushwoosh:pushwoosh-badge:6.7.3"/>
|
|
84
|
+
<framework src="com.pushwoosh:pushwoosh-inbox:6.7.3"/>
|
|
85
|
+
<framework src="com.pushwoosh:pushwoosh-inbox-ui:6.7.3"/>
|
|
86
|
+
<framework src="com.pushwoosh:pushwoosh-huawei:6.7.3"/>
|
|
87
87
|
</platform>
|
|
88
88
|
|
|
89
89
|
<!-- ios -->
|
|
@@ -125,8 +125,8 @@
|
|
|
125
125
|
<source url="https://github.com/CocoaPods/Specs.git"/>
|
|
126
126
|
</config>
|
|
127
127
|
<pods use-frameworks="true">
|
|
128
|
-
<pod name="PushwooshXCFramework" spec="6.5.
|
|
129
|
-
<pod name="PushwooshInboxUIXCFramework" spec="6.1.
|
|
128
|
+
<pod name="PushwooshXCFramework" spec="6.5.7" />
|
|
129
|
+
<pod name="PushwooshInboxUIXCFramework" spec="6.1.2" />
|
|
130
130
|
</pods>
|
|
131
131
|
</podspec>
|
|
132
132
|
|
|
@@ -238,6 +238,20 @@ public class PushNotifications extends CordovaPlugin {
|
|
|
238
238
|
return true;
|
|
239
239
|
}
|
|
240
240
|
|
|
241
|
+
@CordovaMethod
|
|
242
|
+
private boolean setShowPushnotificationAlert(JSONArray data, final CallbackContext callbackContext) {
|
|
243
|
+
try
|
|
244
|
+
{
|
|
245
|
+
boolean showAlert = data.getBoolean(0);
|
|
246
|
+
Pushwoosh.getInstance().setShowPushnotificationAlert(showAlert);
|
|
247
|
+
}
|
|
248
|
+
catch (JSONException e)
|
|
249
|
+
{
|
|
250
|
+
PWLog.error(TAG, "No parameters passed (missing parameters)", e);
|
|
251
|
+
}
|
|
252
|
+
return true;
|
|
253
|
+
}
|
|
254
|
+
|
|
241
255
|
@CordovaMethod
|
|
242
256
|
private boolean setTags(JSONArray data, final CallbackContext callbackContext) {
|
|
243
257
|
JSONObject params;
|
|
@@ -155,6 +155,12 @@ API_AVAILABLE(ios(10))
|
|
|
155
155
|
BOOL shouldReplaceDelegate = YES;
|
|
156
156
|
UNUserNotificationCenter *notificationCenter = [UNUserNotificationCenter currentNotificationCenter];
|
|
157
157
|
|
|
158
|
+
if (notificationCenter.delegate != nil) {
|
|
159
|
+
if ([notificationCenter.delegate conformsToProtocol:@protocol(PushNotificationDelegate)]) {
|
|
160
|
+
shouldReplaceDelegate = NO;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
158
164
|
if (notificationCenter.delegate != nil) {
|
|
159
165
|
if (shouldReplaceDelegate) {
|
|
160
166
|
_originalNotificationCenterDelegate = notificationCenter.delegate;
|
|
@@ -364,6 +370,11 @@ API_AVAILABLE(ios(10.0)) {
|
|
|
364
370
|
[[Pushwoosh sharedInstance] setLanguage:language];
|
|
365
371
|
}
|
|
366
372
|
|
|
373
|
+
- (void)setShowPushnotificationAlert:(CDVInvokedUrlCommand *)command {
|
|
374
|
+
BOOL showPushnotificationAlert = command.arguments[0];
|
|
375
|
+
self.pushManager.showPushnotificationAlert = showPushnotificationAlert;
|
|
376
|
+
}
|
|
377
|
+
|
|
367
378
|
- (void)startBeaconPushes:(CDVInvokedUrlCommand *)command {
|
|
368
379
|
CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsDictionary:@{ @"error" : @"Beacon tracking is not supported" }];
|
|
369
380
|
[self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
|
package/www/PushNotification.js
CHANGED
|
@@ -284,6 +284,18 @@ PushNotification.prototype.setLanguage = function(language) {
|
|
|
284
284
|
exec(null, null, "PushNotification", "setLanguage", [language]);
|
|
285
285
|
};
|
|
286
286
|
|
|
287
|
+
//Function: setShowPushnotificationAlert
|
|
288
|
+
//[android, ios] Configure custom foreground push notification settings distinct from the default system configuration.
|
|
289
|
+
//This allows show foreground push notifications
|
|
290
|
+
//
|
|
291
|
+
//Parameters:
|
|
292
|
+
// "showPushnotificationAlert" - bool value
|
|
293
|
+
//
|
|
294
|
+
|
|
295
|
+
PushNotification.prototype.setShowPushnotificationAlert = function(showPushnotificationAlert) {
|
|
296
|
+
exec(null, null, "PushNotification", "setShowPushnotificationAlert", [showPushnotificationAlert]);
|
|
297
|
+
};
|
|
298
|
+
|
|
287
299
|
//Function: setUserId
|
|
288
300
|
//[android, ios] Set User indentifier. This could be Facebook ID, username or email, or any other user ID.
|
|
289
301
|
//This allows data and events to be matched across multiple user devices.
|