pushwoosh-cordova-plugin 8.3.14 → 8.3.16
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 +2 -1
- package/package.json +1 -1
- package/plugin.xml +10 -10
- package/src/android/src/com/pushwoosh/plugin/pushnotifications/PushNotifications.java +15 -0
- package/src/ios/PushNotification.m +5 -0
- package/www/PushNotification.js +11 -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.16
|
|
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.16
|
|
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.16
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
### Guide
|
package/README_PGB.md
CHANGED
|
@@ -4,5 +4,6 @@ repositories {
|
|
|
4
4
|
|
|
5
5
|
dependencies {
|
|
6
6
|
implementation 'com.google.firebase:firebase-core:(+,21.0.99]'
|
|
7
|
-
implementation 'com.google.firebase:firebase-messaging:(+,23.
|
|
7
|
+
implementation 'com.google.firebase:firebase-messaging:(+,23.1.99]'
|
|
8
|
+
implementation 'androidx.databinding:viewbinding:8.1.1'
|
|
8
9
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pushwoosh-cordova-plugin",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.16",
|
|
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.16">
|
|
3
3
|
|
|
4
4
|
<name>Pushwoosh</name>
|
|
5
5
|
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
<platform name="android">
|
|
29
29
|
<config-file target="config.xml" parent="/*">
|
|
30
30
|
<preference name="GradlePluginGoogleServicesEnabled" value="true" />
|
|
31
|
-
<preference name="GradlePluginGoogleServicesVersion" value="4.3.
|
|
31
|
+
<preference name="GradlePluginGoogleServicesVersion" value="4.3.15" />
|
|
32
32
|
</config-file>
|
|
33
33
|
|
|
34
34
|
<config-file target="AndroidManifest.xml" parent="/manifest/application">
|
|
@@ -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.6.
|
|
81
|
-
<framework src="com.pushwoosh:pushwoosh-amazon:6.6.
|
|
82
|
-
<framework src="com.pushwoosh:pushwoosh-firebase:6.6.
|
|
83
|
-
<framework src="com.pushwoosh:pushwoosh-badge:6.6.
|
|
84
|
-
<framework src="com.pushwoosh:pushwoosh-inbox:6.6.
|
|
85
|
-
<framework src="com.pushwoosh:pushwoosh-inbox-ui:6.6.
|
|
86
|
-
<framework src="com.pushwoosh:pushwoosh-huawei:6.6.
|
|
80
|
+
<framework src="com.pushwoosh:pushwoosh:6.6.16"/>
|
|
81
|
+
<framework src="com.pushwoosh:pushwoosh-amazon:6.6.16"/>
|
|
82
|
+
<framework src="com.pushwoosh:pushwoosh-firebase:6.6.16"/>
|
|
83
|
+
<framework src="com.pushwoosh:pushwoosh-badge:6.6.16"/>
|
|
84
|
+
<framework src="com.pushwoosh:pushwoosh-inbox:6.6.16"/>
|
|
85
|
+
<framework src="com.pushwoosh:pushwoosh-inbox-ui:6.6.16"/>
|
|
86
|
+
<framework src="com.pushwoosh:pushwoosh-huawei:6.6.16"/>
|
|
87
87
|
</platform>
|
|
88
88
|
|
|
89
89
|
<!-- ios -->
|
|
@@ -125,7 +125,7 @@
|
|
|
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.
|
|
128
|
+
<pod name="PushwooshXCFramework" spec="6.5.1" />
|
|
129
129
|
<pod name="PushwooshInboxUIXCFramework" spec="6.1.1" />
|
|
130
130
|
</pods>
|
|
131
131
|
</podspec>
|
|
@@ -219,6 +219,21 @@ public class PushNotifications extends CordovaPlugin {
|
|
|
219
219
|
return true;
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
+
@CordovaMethod
|
|
223
|
+
private boolean setLanguage(JSONArray data, final CallbackContext callbackContext)
|
|
224
|
+
{
|
|
225
|
+
try
|
|
226
|
+
{
|
|
227
|
+
String language = data.getString(0);
|
|
228
|
+
Pushwoosh.getInstance().setLanguage(language);
|
|
229
|
+
}
|
|
230
|
+
catch (JSONException e)
|
|
231
|
+
{
|
|
232
|
+
PWLog.error(TAG, "No parameters passed (missing parameters)", e);
|
|
233
|
+
}
|
|
234
|
+
return true;
|
|
235
|
+
}
|
|
236
|
+
|
|
222
237
|
@CordovaMethod
|
|
223
238
|
private boolean setTags(JSONArray data, final CallbackContext callbackContext) {
|
|
224
239
|
JSONObject params;
|
|
@@ -230,6 +230,11 @@ static PushNotification *pw_PushNotificationPlugin;
|
|
|
230
230
|
}];
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
+
- (void)setLanguage:(CDVInvokedUrlCommand *)command {
|
|
234
|
+
NSString *language = command.arguments[0];
|
|
235
|
+
[[Pushwoosh sharedInstance] setLanguage:language];
|
|
236
|
+
}
|
|
237
|
+
|
|
233
238
|
- (void)startBeaconPushes:(CDVInvokedUrlCommand *)command {
|
|
234
239
|
CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsDictionary:@{ @"error" : @"Beacon tracking is not supported" }];
|
|
235
240
|
[self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
|
package/www/PushNotification.js
CHANGED
|
@@ -273,6 +273,17 @@ PushNotification.prototype.clearLaunchNotification = function(callback) {
|
|
|
273
273
|
exec(callback, callback, "PushNotification", "clearLaunchNotification", []);
|
|
274
274
|
};
|
|
275
275
|
|
|
276
|
+
//Function: setLanguage
|
|
277
|
+
//[android, ios] Set custom application language (as opposed to the default system language).
|
|
278
|
+
//This allows sending localized push messages
|
|
279
|
+
//
|
|
280
|
+
//Parameters:
|
|
281
|
+
// "language" - string containing language code, i.e. "en", "fr"
|
|
282
|
+
//
|
|
283
|
+
PushNotification.prototype.setLanguage = function(language) {
|
|
284
|
+
exec(null, null, "PushNotification", "setLanguage", [language]);
|
|
285
|
+
};
|
|
286
|
+
|
|
276
287
|
//Function: setUserId
|
|
277
288
|
//[android, ios] Set User indentifier. This could be Facebook ID, username or email, or any other user ID.
|
|
278
289
|
//This allows data and events to be matched across multiple user devices.
|