pushwoosh-cordova-plugin 8.3.34 → 8.3.36

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.
@@ -58,6 +58,8 @@ body:
58
58
  label: Your Pushwoosh Cordova plugin version
59
59
  description: Your version of the Cordova plugin integrated into the application. You may find it on the [releases page](https://github.com/Pushwoosh/pushwoosh-phonegap-plugin/releases)
60
60
  options:
61
+ - 8.3.36
62
+ - 8.3.35
61
63
  - 8.3.34
62
64
  - 8.3.33
63
65
  - 8.3.28
package/README.md CHANGED
@@ -14,13 +14,13 @@ Cross-Platform push notifications by Pushwoosh for Cordova / PhoneGap
14
14
  Using npm:
15
15
 
16
16
  ```
17
- cordova plugin add pushwoosh-cordova-plugin@8.3.34
17
+ cordova plugin add pushwoosh-cordova-plugin@8.3.36
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.34
23
+ cordova plugin add https://github.com/Pushwoosh/pushwoosh-phonegap-plugin.git#8.3.36
24
24
  ```
25
25
 
26
26
  ### Guide
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Pushwoosh
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,77 @@
1
+ # CORDOVA SAMPLE
2
+
3
+ ## To launch and utilize a sample with Pushwoosh SDK integration, clone or download the repository archive.
4
+
5
+ ### iOS, Android
6
+ <img src="https://github.com/Pushwoosh/pushwoosh-cordova-sample/blob/main/Screenshots/iOS.png" alt="Alt text" width="300"> <img src="https://github.com/Pushwoosh/pushwoosh-cordova-sample/blob/main/Screenshots/Android.png" alt="Alt text" width="350">
7
+
8
+ ### 1. Go to 'newdemo' folder and install the package from the command line:
9
+
10
+ ```
11
+ cordova plugin add pushwoosh-cordova-plugin
12
+ ```
13
+
14
+ ### 2. Navigate to the js folder within the www directory and open the file named index.js. Add your App ID and FCM Sender ID
15
+
16
+ ```
17
+ /**
18
+ * Function: onDeviceReady
19
+ * [android, ios, wp8, windows] Initialize Pushwoosh plugin and trigger a start push message
20
+ * Should be called on every app launch
21
+ * Parameters:
22
+ * "config.appid" - Pushwoosh application code
23
+ * "config.projectid" - GCM project number for android platform
24
+ * "config.serviceName" - MPNS service name for wp8 platform
25
+ */
26
+
27
+ function initPushwoosh() {
28
+ var pushwoosh = cordova.require("pushwoosh-cordova-plugin.PushNotification");
29
+
30
+ //Should be called before pushwoosh.onDeviceReady
31
+ document.addEventListener('push-notification', function(event) {
32
+ var notification = event.notification;
33
+ // handle push open here
34
+ });
35
+
36
+ pushwoosh.onDeviceReady({
37
+ appid: "XXXXX-XXXXX",
38
+ projectid: "XXXXXXXXXXXXXXX",
39
+ serviceName: "XXXX"
40
+ });
41
+ }
42
+ ```
43
+
44
+ ### 3. [Android] Add the 'google-services.json' file to the app folder in Android
45
+
46
+ ### 4. [Android] Add the following section to your config.xml:
47
+
48
+ ```
49
+ <platform name="android">
50
+ <resource-file src="google-services.json" target="app/google-services.json" />
51
+ ...
52
+ </platform>
53
+
54
+ ```
55
+
56
+ ### 5. [iOS] Badges
57
+
58
+ ### a. Open the Xcode project, navigate to the TARGETS tab, and add your App Group name in the App Group section for both targets (newdemo and NotificationService).
59
+
60
+ <img src="https://github.com/Pushwoosh/pushwoosh-cordova-sample/blob/main/Screenshots/xcode_1.png" alt="Alt text" width="500">
61
+
62
+ ### b. Add the App Groups ID to your info.plist for each target of your application:
63
+
64
+ ```
65
+ <key>PW_APP_GROUPS_NAME</key>
66
+ <string>group.com.example.demo</string>
67
+
68
+ ```
69
+
70
+ ## The guide for SDK integration is available on the Pushwoosh [website](https://docs.pushwoosh.com/platform-docs/pushwoosh-sdk/cross-platform-frameworks/cordova/integrating-cordova-plugin)
71
+
72
+ Documentation:
73
+ https://github.com/Pushwoosh/pushwoosh-ios-sdk/tree/master/Documentation
74
+
75
+ Pushwoosh team
76
+ http://www.pushwoosh.com
77
+
Binary file
Binary file
Binary file
@@ -0,0 +1,19 @@
1
+ <?xml version='1.0' encoding='utf-8'?>
2
+ <widget id="com.pushwoosh.newdemo" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
3
+ <name>newdemo</name>
4
+ <description>Sample Apache Cordova App</description>
5
+ <author email="dev@cordova.apache.org" href="https://cordova.apache.org">
6
+ Apache Cordova Team
7
+ </author>
8
+ <content src="index.html" />
9
+ <allow-intent href="http://*/*" />
10
+ <allow-intent href="https://*/*" />
11
+
12
+ <!-- Local Pushwoosh Cordova Plugin -->
13
+ <plugin name="pushwoosh-cordova-plugin" spec="../../">
14
+ <variable name="LOG_LEVEL" value="DEBUG" />
15
+ <variable name="IOS_FOREGROUND_ALERT_TYPE" value="NONE" />
16
+ <variable name="ANDROID_FOREGROUND_PUSH" value="false" />
17
+ </plugin>
18
+ </widget>
19
+
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "com.pushwoosh.newdemo",
3
+ "displayName": "newdemo",
4
+ "version": "1.0.0",
5
+ "description": "A sample Apache Cordova application that responds to the deviceready event.",
6
+ "main": "index.js",
7
+ "scripts": {
8
+ "test": "echo \"Error: no test specified\" && exit 1"
9
+ },
10
+ "keywords": [
11
+ "ecosystem:cordova"
12
+ ],
13
+ "author": "Apache Cordova Team",
14
+ "license": "Apache-2.0",
15
+ "devDependencies": {
16
+ "cordova-android": "^12.0.1",
17
+ "cordova-ios": "^7.1.0",
18
+ "pushwoosh-cordova-plugin": "file:../.."
19
+ },
20
+ "cordova": {
21
+ "platforms": [
22
+ "ios",
23
+ "android"
24
+ ],
25
+ "plugins": {
26
+ "pushwoosh-cordova-plugin": {
27
+ "LOG_LEVEL": "DEBUG",
28
+ "IOS_FOREGROUND_ALERT_TYPE": "NONE",
29
+ "ANDROID_FOREGROUND_PUSH": "false"
30
+ }
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,156 @@
1
+ .scroll-view {
2
+ width: 100%;
3
+ height: 100%;
4
+ overflow: auto;
5
+ }
6
+
7
+ .scroll-content {
8
+ width: 100%;
9
+ padding: 0px;
10
+ }
11
+
12
+ .container {
13
+ display: flex;
14
+ align-items: center;
15
+ margin-top: 150px;
16
+ }
17
+
18
+ .container_enabled {
19
+ display: flex;
20
+ align-items: center;
21
+ }
22
+
23
+ .container_lang {
24
+ display: flex;
25
+ align-items: center;
26
+ }
27
+
28
+ .container_userId {
29
+ display: flex;
30
+ align-items: center;
31
+ }
32
+
33
+ .container_postEvent {
34
+ display: flex;
35
+ align-items: center;
36
+ }
37
+
38
+ .container_btns {
39
+ display: flex;
40
+ align-items: center;
41
+ }
42
+
43
+ .input-gap {
44
+ width: 5px;
45
+ }
46
+
47
+ .input-container {
48
+ flex: 1;
49
+ margin-right: 18px;
50
+ margin-left: 18px;
51
+ }
52
+
53
+ #textField1 {
54
+ width: 100%;
55
+ height: 23px;
56
+ }
57
+
58
+ #textField2 {
59
+ width: 100%;
60
+ height: 23px;
61
+ }
62
+
63
+ #textField3 {
64
+ width: 100%;
65
+ height: 23px;
66
+ }
67
+
68
+ #textField4 {
69
+ width: 100%;
70
+ height: 23px;
71
+ }
72
+
73
+ #textField5 {
74
+ width: 100%;
75
+ height: 23px;
76
+ }
77
+
78
+ .btn {
79
+ width: 120px;
80
+ height: 35px;
81
+ }
82
+
83
+ .btn_get {
84
+ width: 100%;
85
+ height: 35px;
86
+ background-color: #003175;
87
+ border-radius: 14px;
88
+ font-weight: bold;
89
+ color: white;
90
+ }
91
+
92
+ .container_setTags {
93
+ display: flex;
94
+ align-items: center;
95
+ }
96
+
97
+ .container_setTags input[type="text"] {
98
+ width: auto;
99
+ }
100
+
101
+ .label {
102
+ margin-right: 10px;
103
+ font-weight: bold;
104
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
105
+ }
106
+
107
+ .container_setLanguage {
108
+ margin-top: 0px;
109
+ display: flex;
110
+ align-items: center;
111
+ }
112
+
113
+ .gap {
114
+ margin-bottom: 20px;
115
+ }
116
+
117
+ .top-image {
118
+ width: 70px;
119
+ height: 70px;
120
+ position: absolute;
121
+ top: 0;
122
+ left: 50%;
123
+ transform: translateX(-50%);
124
+ margin-top: 70px;
125
+ border-radius: 14px;
126
+ }
127
+
128
+ .ios-switch {
129
+ position: relative;
130
+ width: 50px;
131
+ height: 28px;
132
+ border-radius: 14px;
133
+ background-color: #c0c0c0;
134
+ overflow: hidden;
135
+ vertical-align: middle;
136
+ }
137
+
138
+ .ios-switch input[type="checkbox"] {
139
+ display: none;
140
+ }
141
+
142
+ .ios-switch label {
143
+ position: absolute;
144
+ top: 0;
145
+ left: 0;
146
+ width: 50%;
147
+ height: 100%;
148
+ background-color: #363636;
149
+ border-radius: 14px;
150
+ transition: left 0.3s ease;
151
+ }
152
+
153
+ .ios-switch input[type="checkbox"]:checked + label {
154
+ left: 50%;
155
+ background-color: #4CAF50;
156
+ }
Binary file
@@ -0,0 +1,126 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <meta http-equiv="Content-Security-Policy"
7
+ content="default-src 'self' data: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *; img-src 'self' data: content:;">
8
+ <meta name="format-detection" content="telephone=no">
9
+ <meta name="msapplication-tap-highlight" content="no">
10
+ <meta name="viewport" content="initial-scale=1, width=device-width, viewport-fit=cover">
11
+ <meta name="color-scheme" content="light dark">
12
+ <link rel="stylesheet" href="css/index.css">
13
+ <style>
14
+ .container {
15
+ display: flex;
16
+ justify-content: space-between;
17
+ align-items: center;
18
+ }
19
+
20
+ .label {
21
+ flex-grow: 1;
22
+ }
23
+ </style>
24
+ </head>
25
+
26
+ <body>
27
+ <div class="app">
28
+ <div id="deviceready" class="blink">
29
+ <div class="scroll-view">
30
+ <div class="scroll-content" id="scroll-content">
31
+ <img src="img/logo.png" alt="Your Image" class="top-image">
32
+
33
+ <div class="container">
34
+ <label class="label" for="switcher">REGISTER FOR NOTIFICATIONS:</label>
35
+ <div class="ios-switch">
36
+ <input type="checkbox" id="switcher">
37
+ <label for="switcher"></label>
38
+ </div>
39
+ </div>
40
+
41
+ <div class="gap"></div>
42
+
43
+ <div class="container_enabled">
44
+ <input type="text" id="textField1" placeholder="KEY">
45
+ <div class="input-gap"></div>
46
+ <input type="text" id="textField2" placeholder="VALUE">
47
+ </div>
48
+
49
+ <div class="gap"></div>
50
+
51
+ <div class="container_setTags">
52
+ <button class="btn_get" id="setTags">SET TAGS</button>
53
+ </div>
54
+
55
+ <div class="gap"></div>
56
+
57
+ <div class="container_lang">
58
+ <button class="btn" id="setLangBtn">SET LANGUAGE</button>
59
+ <div class="input-container">
60
+ <input type="text" id="textField3" placeholder="'en'">
61
+ </div>
62
+ </div>
63
+
64
+ <div class="gap"></div>
65
+
66
+ <div class="container_userId">
67
+ <button class="btn" id="setUserBtn">SET USER ID</button>
68
+ <div class="input-container">
69
+ <input type="text" id="textField4" placeholder="USER ID">
70
+ </div>
71
+ </div>
72
+
73
+ <div class="gap"></div>
74
+
75
+ <div class="container_postEvent">
76
+ <button class="btn" id="setPostEventBtn">POST EVENT</button>
77
+ <div class="input-container">
78
+ <input type="text" id="textField5" placeholder="EVENT NAME">
79
+ </div>
80
+ </div>
81
+
82
+ <div class="gap"></div>
83
+
84
+ <div class="container_btns">
85
+ <button class="btn_get" id="getTags">GET TAGS</button>
86
+ </div>
87
+
88
+ <div class="gap"></div>
89
+
90
+ <div class="container_btns">
91
+ <button class="btn_get" id="getPushToken">GET PUSH TOKEN</button>
92
+ </div>
93
+
94
+ <div class="gap"></div>
95
+
96
+ <div class="container_btns">
97
+ <button class="btn_get" id="getHwid">GET HWID</button>
98
+ </div>
99
+
100
+ <div class="gap"></div>
101
+
102
+ <div class="container_btns">
103
+ <button class="btn_get" id="resetBadges">RESET BADGES</button>
104
+ </div>
105
+
106
+ <div class="gap"></div>
107
+
108
+ <div class="container_btns">
109
+ <button class="btn_get" id="localNotification">SEND LOCAL NOTIFICATION</button>
110
+ </div>
111
+
112
+ <div class="gap"></div>
113
+
114
+ <div class="container_btns">
115
+ <button class="btn_get" id="clearNotificationCenter">CLEAR NOTIFICATION CENTER</button>
116
+ </div>
117
+
118
+ </div>
119
+ </div>
120
+ </div>
121
+ </div>
122
+ <script src="cordova.js"></script>
123
+ <script src="js/index.js"></script>
124
+ </body>
125
+
126
+ </html>