pushwoosh-cordova-plugin 6.1.0 → 6.1.1

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.
Files changed (79) hide show
  1. package/{MIT-LICENSE.txt → LICENSE.md} +0 -0
  2. package/README.md +20 -32
  3. package/README_PGB.md +32 -0
  4. package/package.json +1 -1
  5. package/package_pgb.json +29 -0
  6. package/plugin.xml +71 -85
  7. package/src/android/src/com/pushwoosh/plugin/internal/PhonegapPluginProvider.java +22 -0
  8. package/src/android/src/com/pushwoosh/plugin/pushnotifications/CustomFirebaseMessagingService.java +29 -0
  9. package/src/android/src/com/pushwoosh/plugin/pushnotifications/InboxUiStyleManager.java +136 -0
  10. package/src/android/src/com/pushwoosh/plugin/pushnotifications/PushNotifications.java +339 -388
  11. package/src/android/src/com/pushwoosh/plugin/pushnotifications/PushwooshNotificationServiceExtension.java +38 -0
  12. package/src/ios/PWBackward.h +25 -0
  13. package/src/ios/PWBackward.m +53 -0
  14. package/src/ios/PushNotification.m +409 -158
  15. package/src/ios/Pushwoosh.framework/Modules/module.modulemap +6 -0
  16. package/src/ios/Pushwoosh.framework/Versions/A/Headers/PWAppDelegate.h +20 -0
  17. package/src/ios/Pushwoosh.framework/Versions/A/Headers/PWGDPRManager.h +46 -0
  18. package/src/ios/Pushwoosh.framework/Versions/A/Headers/PWInAppManager.h +174 -0
  19. package/src/ios/Pushwoosh.framework/Versions/A/Headers/PWInbox.h +147 -0
  20. package/src/ios/Pushwoosh.framework/Versions/A/Headers/PWInlineInAppView.h +26 -0
  21. package/src/ios/Pushwoosh.framework/Versions/A/Headers/PWLog.h +23 -0
  22. package/src/ios/Pushwoosh.framework/Versions/A/Headers/PWMessaging.h +20 -0
  23. package/src/ios/Pushwoosh.framework/Versions/A/Headers/PWNotificationExtensionManager.h +33 -0
  24. package/src/ios/Pushwoosh.framework/Versions/A/Headers/PWRichMediaManager.h +118 -0
  25. package/src/ios/Pushwoosh.framework/Versions/A/Headers/PWRichMediaStyle.h +122 -0
  26. package/src/ios/Pushwoosh.framework/Versions/A/Headers/PushNotificationManager.h +263 -151
  27. package/src/ios/Pushwoosh.framework/Versions/A/Headers/Pushwoosh.h +525 -0
  28. package/src/ios/Pushwoosh.framework/Versions/A/libPushwoosh.a +0 -0
  29. package/src/ios/PushwooshInboxBundle.bundle/Info.plist +0 -0
  30. package/src/ios/PushwooshInboxBundle.bundle/PWIInboxAttachmentViewController.nib +0 -0
  31. package/src/ios/PushwooshInboxBundle.bundle/PWIInboxMessageViewCell.nib +0 -0
  32. package/src/ios/PushwooshInboxBundle.bundle/PWIInboxViewController.nib +0 -0
  33. package/src/ios/PushwooshInboxBundle.bundle/errorMessage@2x.png +0 -0
  34. package/src/ios/PushwooshInboxBundle.bundle/inbox_icon.png +0 -0
  35. package/src/ios/PushwooshInboxBundle.bundle/noMessage@2x.png +0 -0
  36. package/src/ios/PushwooshInboxBundle.bundle/unread.png +0 -0
  37. package/src/ios/PushwooshInboxUI.framework/Modules/module.modulemap +6 -0
  38. package/src/ios/PushwooshInboxUI.framework/Versions/A/Headers/PWIInboxStyle.h +122 -0
  39. package/src/ios/PushwooshInboxUI.framework/Versions/A/Headers/PWIInboxUI.h +39 -0
  40. package/src/ios/PushwooshInboxUI.framework/Versions/A/Headers/PushwooshInboxUI.h +19 -0
  41. package/src/ios/PushwooshInboxUI.framework/Versions/A/libPushwooshInboxUI.a +0 -0
  42. package/src/windows/PushSDK/Newtonsoft.Json.dll +0 -0
  43. package/src/windows/PushSDK/PushSDK.winmd +0 -0
  44. package/src/windows/PushwooshPluginProxy.js +88 -74
  45. package/src/wp8/PushNotification.cs +14 -0
  46. package/src/wp8/PushSDK/PushSDK.dll +0 -0
  47. package/www/PushNotification.js +171 -45
  48. package/Documentation/files/PushNotification-js.html +0 -157
  49. package/Documentation/index/Classes.html +0 -33
  50. package/Documentation/index/Functions.html +0 -61
  51. package/Documentation/index/General.html +0 -65
  52. package/Documentation/index.html +0 -1
  53. package/Documentation/javascript/main.js +0 -841
  54. package/Documentation/javascript/prettify.js +0 -1526
  55. package/Documentation/javascript/searchdata.js +0 -92
  56. package/Documentation/search/ClassesP.html +0 -20
  57. package/Documentation/search/FunctionsA.html +0 -20
  58. package/Documentation/search/FunctionsC.html +0 -20
  59. package/Documentation/search/FunctionsG.html +0 -20
  60. package/Documentation/search/FunctionsO.html +0 -20
  61. package/Documentation/search/FunctionsP.html +0 -20
  62. package/Documentation/search/FunctionsR.html +0 -20
  63. package/Documentation/search/FunctionsS.html +0 -20
  64. package/Documentation/search/FunctionsU.html +0 -20
  65. package/Documentation/search/GeneralA.html +0 -20
  66. package/Documentation/search/GeneralC.html +0 -20
  67. package/Documentation/search/GeneralF.html +0 -20
  68. package/Documentation/search/GeneralG.html +0 -20
  69. package/Documentation/search/GeneralO.html +0 -20
  70. package/Documentation/search/GeneralP.html +0 -20
  71. package/Documentation/search/GeneralR.html +0 -20
  72. package/Documentation/search/GeneralS.html +0 -20
  73. package/Documentation/search/GeneralU.html +0 -20
  74. package/Documentation/search/NoResults.html +0 -15
  75. package/Documentation/styles/main.css +0 -828
  76. package/VERSION.md +0 -138
  77. package/push.gradle +0 -21
  78. package/src/android/src/com/pushwoosh/plugin/pushnotifications/NotificationFactory.java +0 -29
  79. package/src/ios/Pushwoosh.framework/Versions/A/Pushwoosh +0 -0
@@ -0,0 +1,39 @@
1
+ //
2
+ // PWIInboxUI.h
3
+ // PushwooshInboxUI
4
+ //
5
+ // Created by Pushwoosh on 01/11/2017.
6
+ // Copyright © 2017 Pushwoosh. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+ #import <UIKit/UIKit.h>
11
+
12
+ @protocol PWInboxMessageProtocol;
13
+
14
+ @interface PWIInboxViewController : UIViewController
15
+
16
+ @property (nonatomic) void (^onMessageClickBlock)(id<PWInboxMessageProtocol> message);
17
+
18
+ /**
19
+ Reloads everything from scratch.
20
+ */
21
+ - (void)reloadData;
22
+ - (instancetype)init NS_UNAVAILABLE;
23
+
24
+ @end
25
+
26
+ @class PWIInboxStyle;
27
+ @interface PWIInboxUI : NSObject
28
+
29
+ /**
30
+ @return PWIInboxViewController with a specified style
31
+ */
32
+ + (PWIInboxViewController *)createInboxControllerWithStyle:(PWIInboxStyle *)style;
33
+
34
+ /**
35
+ @return PWIInboxViewController with a specified style and height of table view
36
+ */
37
+ + (PWIInboxViewController *)createInboxControllerWithStyle:(PWIInboxStyle *)style andContentHeight:(CGFloat)contentHeight;
38
+
39
+ @end
@@ -0,0 +1,19 @@
1
+ //
2
+ // PushwooshInboxUI.h
3
+ // PushwooshInboxUI
4
+ //
5
+ // Created by Pushwoosh on 01/11/2017.
6
+ // Copyright © 2017 Pushwoosh. All rights reserved.
7
+ //
8
+
9
+ #import <UIKit/UIKit.h>
10
+
11
+ //! Project version number for PushwooshInboxUI.
12
+ FOUNDATION_EXPORT double PushwooshInboxUIVersionNumber;
13
+
14
+ //! Project version string for PushwooshInboxUI.
15
+ FOUNDATION_EXPORT NSString * const PushwooshInboxUIVersion;
16
+
17
+ #import "PWIInboxUI.h"
18
+ #import "PWIInboxStyle.h"
19
+
Binary file
@@ -1,71 +1,80 @@
1
1
  var cordova = require('cordova'),
2
- pushwooshPlugin= require('./PushNotification');
2
+ pushwooshPlugin = require('./PushNotification');
3
3
 
4
4
 
5
- var platform = require('cordova/platform');
5
+ var platform = require('cordova/platform');
6
6
 
7
7
  module.exports = {
8
8
 
9
- onDeviceReady : function(success, fail, config) {
10
- this.service = new PushSDK.NotificationService.getCurrent(config[0].appid);
11
-
12
- var startPushData = null;
13
-
14
- if (platform.activationContext && platform.activationContext.args) {
15
- startPushData = platform.activationContext.args;
16
- }
17
-
18
- if (startPushData !== null)
19
- PushSDK.NotificationService.handleStartPush(startPushData);
20
-
21
- success();
22
- },
23
-
24
- registerDevice: function (success, fail) {
25
- if (!this.service) {
26
- // postpone
27
- setTimeout(function () { registerDevice(success, fail) }, 1000);
28
- }
29
-
30
- this.service.ononpushtokenreceived = function (token) {
31
- success({ "pushToken" : token });
32
- };
33
-
34
- this.service.ononpushtokenfailed = fail;
35
-
36
- this.service.ononpushaccepted = function (args) {
37
- var unifiedPush = { "onStart": args.onStart, "foreground": !args.onStart, "userdata": JSON.parse(args.userData), "windows": args };
38
- setTimeout(function () { cordova.require("pushwoosh-cordova-plugin.PushNotification").notificationCallback(unifiedPush); }, 0);
39
- }
40
-
41
- this.service.subscribeToPushService();
42
- },
43
-
44
- unregisterDevice: function(success, fail) {
45
- this.service.unsubscribeFromPushes();
46
- success();
47
- },
48
-
49
- getPushwooshHWID: function (success) {
50
- success(this.service.deviceUniqueID);
51
- },
52
-
53
- getPushToken: function(success) {
54
- success(this.service.pushToken);
55
- },
56
-
57
- startLocationTracking: function(success, fail) {
58
- this.service.startGeoLocation();
59
- success();
60
- },
61
-
62
- stopLocationTracking: function(success, fail) {
63
- this.service.stopLocationTracking();
64
- success();
65
- },
66
-
67
- getTags: function (success, fail) {
68
- this.service.getTags(
9
+ onDeviceReady: function (success, fail, config) {
10
+ this.service = new PushSDK.NotificationService.getCurrent(config[0].appid);
11
+
12
+ var startPushData = null;
13
+
14
+ if (platform.activationContext && platform.activationContext.args) {
15
+ startPushData = platform.activationContext.args;
16
+ }
17
+
18
+ if (startPushData !== null)
19
+ PushSDK.NotificationService.handleStartPush(startPushData);
20
+
21
+ success();
22
+ },
23
+
24
+ onAppActivated: function (success, fail, args) {
25
+ if (args !== null && args.length > 0)
26
+ PushSDK.NotificationService.handleStartPush(args[0]);
27
+ },
28
+
29
+ registerDevice: function (success, fail) {
30
+ if (!this.service) {
31
+ // postpone
32
+ setTimeout(function () { this.registerDevice(success, fail) }, 1000);
33
+ }
34
+
35
+ this.service.ononpushtokenreceived = function (token) {
36
+ success({ "pushToken": token });
37
+ };
38
+
39
+ this.service.ononpushtokenfailed = fail;
40
+
41
+ this.service.ononpushreceived = function (args) {
42
+ var unifiedPush = { "onStart": args.onStart, "foreground": !args.onStart, "userdata": JSON.parse(args.userData), "windows": args };
43
+ setTimeout(function () { cordova.require("pushwoosh-cordova-plugin.PushNotification").pushReceivedCallback(unifiedPush); }, 0);
44
+ }
45
+
46
+ this.service.ononpushaccepted = function (args) {
47
+ var unifiedPush = { "onStart": args.onStart, "foreground": !args.onStart, "userdata": JSON.parse(args.userData), "windows": args };
48
+ setTimeout(function () { cordova.require("pushwoosh-cordova-plugin.PushNotification").notificationCallback(unifiedPush); }, 0);
49
+ }
50
+
51
+ this.service.subscribeToPushService();
52
+ },
53
+
54
+ unregisterDevice: function (success, fail) {
55
+ this.service.unsubscribeFromPushes(function () { success(); }, fail);
56
+ },
57
+
58
+ getPushwooshHWID: function (success) {
59
+ success(this.service.deviceUniqueID);
60
+ },
61
+
62
+ getPushToken: function (success) {
63
+ success(this.service.pushToken);
64
+ },
65
+
66
+ startLocationTracking: function (success, fail) {
67
+ this.service.startGeoLocation();
68
+ success();
69
+ },
70
+
71
+ stopLocationTracking: function (success, fail) {
72
+ this.service.stopLocationTracking();
73
+ success();
74
+ },
75
+
76
+ getTags: function (success, fail) {
77
+ this.service.getTags(
69
78
  function (sender, tagsString) {
70
79
  var tags = JSON.parse(tagsString);
71
80
  success(tags);
@@ -74,20 +83,25 @@ module.exports = {
74
83
  fail(error);
75
84
  }
76
85
  );
77
- },
86
+ },
87
+
88
+ setTags: function (success, fail, tags) {
89
+ var keys = [];
90
+ var values = [];
78
91
 
79
- setTags: function (success, fail, tags) {
80
- var keys = [];
81
- var values = [];
92
+ for (key in tags[0]) {
93
+ keys.push(key);
94
+ values.push(tags[0][key]);
95
+ }
82
96
 
83
- for (key in tags[0]) {
84
- keys.push(key);
85
- values.push(tags[0][key]);
86
- }
97
+ this.service.sendTag(keys, values, null, null);
98
+ success();
99
+ },
87
100
 
88
- this.service.sendTag(keys, values, null, null);
89
- success();
90
- }
101
+ setApplicationIconBadgeNumber: function (success, fail, config) {
102
+ var badge = config[0]["badge"];
103
+ this.service.setBadgeNumber(badge);
104
+ }
91
105
  };
92
106
 
93
- require("cordova/exec/proxy").add("PushNotification", module.exports);
107
+ require("cordova/exec/proxy").add("PushNotification", module.exports);
@@ -206,6 +206,20 @@ namespace WPCordovaClassLib.Cordova.Commands
206
206
  DispatchCommandResult(new PluginResult(PluginResult.Status.OK, "GeoZone service is stopped"));
207
207
  }
208
208
 
209
+ [DataContract]
210
+ public class BadgeOptions
211
+ {
212
+ [DataMember(Name = "badge", IsRequired = true)]
213
+ public int Badge { get; set; }
214
+ }
215
+
216
+ public void setApplicationIconBadgeNumber(string options)
217
+ {
218
+ string[] args = JSON.JsonHelper.Deserialize<string[]>(options);
219
+ BadgeOptions opts = JSON.JsonHelper.Deserialize<BadgeOptions>(args[0]);
220
+ service.SetBadgeNumber(opts.Badge);
221
+ }
222
+
209
223
  void ExecutePushNotificationCallback(object sender, ToastPush push)
210
224
  {
211
225
  Deployment.Current.Dispatcher.BeginInvoke(() =>
Binary file
@@ -47,6 +47,16 @@ PushNotification.prototype.onDeviceReady = function(config) {
47
47
  exec(null, null, "PushNotification", "onDeviceReady", config ? [config] : []);
48
48
  };
49
49
 
50
+ //Function: onAppActivated
51
+ //[windows] The event fires when Windows Runtime activation has occurred
52
+ //
53
+ //Parameters:
54
+ // "args" - activation arguments
55
+ //
56
+ PushNotification.prototype.onAppActivated = function (args) {
57
+ exec(null, null, "PushNotification", "onAppActivated", args ? [args] : []);
58
+ };
59
+
50
60
  //Function: registerDevice
51
61
  //[android, ios, wp8, windows] Register device for push notifications and retreive a push Token
52
62
  //
@@ -69,6 +79,26 @@ PushNotification.prototype.registerDevice = function(success, fail) {
69
79
  exec(success, fail, "PushNotification", "registerDevice", []);
70
80
  };
71
81
 
82
+ //Function: additionalAuthorizationOptions
83
+ //[ios] Authorization options in addition to UNAuthorizationOptionBadge | UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionCarPlay.
84
+ //Should be called before registering for pushes
85
+ //
86
+ //Parameters:
87
+ // "options.UNAuthorizationOptionCriticalAlert" - adds UNAuthorizationOptionCriticalAlert option
88
+ // "options.UNAuthorizationOptionProvisional" - adds UNAuthorizationOptionProvisional option
89
+ // "options.UNAuthorizationOptionProvidesAppNotificationSettings" - adds UNAuthorizationOptionProvidesAppNotificationSettings option
90
+ //
91
+ //Example:
92
+ //(start code)
93
+ // pushwoosh.additionalAuthorizationOptions({
94
+ // "UNAuthorizationOptionCriticalAlert" : 1,
95
+ // "UNAuthorizationOptionProvisional": 0 // set 0 or don't specify the option if you don't want to add it to your app.
96
+ // });
97
+ //(end)
98
+ PushNotification.prototype.additionalAuthorizationOptions = function(options) {
99
+ exec(null, null, "PushNotification", "additionalAuthorizationOptions", options ? [options] : []);
100
+ }
101
+
72
102
  //Function: unregisterDevice
73
103
  //[android, ios, wp8, windows] Unregister device form receiving push notifications
74
104
  //
@@ -166,29 +196,6 @@ PushNotification.prototype.getPushwooshHWID = function(success) {
166
196
  exec(success, null, "PushNotification", "getPushwooshHWID", []);
167
197
  };
168
198
 
169
- //Function: startLocationTracking
170
- //[android, ios, wp8, windows] Starts geolocation based push notifications. You need to configure Geozones in Pushwoosh Control panel.
171
- //
172
- //Parameters:
173
- // "success" - success callback
174
- // "fail" - error callback
175
- //
176
- PushNotification.prototype.startLocationTracking = function(success, fail) {
177
- exec(success, fail, "PushNotification", "startLocationTracking", []);
178
- };
179
-
180
- //Function: stopLocationTracking
181
- //[android, ios, wp8, windows] Stops geolocation based push notifications
182
- //
183
- //Parameters:
184
- // "success" - success callback
185
- // "fail" - error callback
186
- //
187
- PushNotification.prototype.stopLocationTracking = function(success, fail) {
188
- exec(success, fail, "PushNotification", "stopLocationTracking", []);
189
- };
190
-
191
-
192
199
  //Function: getRemoteNotificationStatus
193
200
  //[android, ios] Returns a detailed status of push notification permissions.
194
201
  //
@@ -207,7 +214,7 @@ PushNotification.prototype.getRemoteNotificationStatus = function(callback, erro
207
214
  };
208
215
 
209
216
  //Function: setApplicationIconBadgeNumber
210
- //[android, ios] Set the application icon badge number
217
+ //[android, ios, wp8, windows] Set the application icon badge number
211
218
  //
212
219
  //Parameters:
213
220
  // "badgeNumber" - icon badge number
@@ -293,8 +300,30 @@ PushNotification.prototype.postEvent = function(event, attributes) {
293
300
  exec(null, null, "PushNotification", "postEvent", [event, attributes]);
294
301
  };
295
302
 
303
+ //Function: addJavaScriptInterface
304
+ //Adds javascript interface for In-App Messages.
305
+ //Interface will be accessible from Rich Media as object with specified `name` and function 'callFunction('<function_name>', JSON.stringify(<params>))'.
306
+ //
307
+ //Parameters:
308
+ // "name" - interface name
309
+ //
310
+ //Example:
311
+ //Cordova part:
312
+ // function foo() {
313
+ // alert("Bridge is working!");
314
+ // }
315
+ //
316
+ //
317
+ // pushwoosh.addJavaScriptInterface('testBridge');
318
+ //
319
+ //Rich Media part:
320
+ // testBridge.callFunction('foo', JSON.stringify({'param1':1,'param2':'test'}))
321
+ PushNotification.prototype.addJavaScriptInterface = function(name) {
322
+ exec(null, null, "PushNotification", "addJavaScriptInterface", [name]);
323
+ };
324
+
296
325
  //Function: createLocalNotification
297
- //[android] Schedules local notification,
326
+ //[android, ios] Schedules local notification,
298
327
  //
299
328
  //Parameters:
300
329
  // "config.msg" - notification message
@@ -305,7 +334,7 @@ PushNotification.prototype.postEvent = function(event, attributes) {
305
334
  //
306
335
  //Example:
307
336
  //(start code)
308
- // pushwoosh.createLocalNotification({msg:"Your pumpkins are ready!", seconds:30, userData:"optional"}
337
+ // pushwoosh.createLocalNotification({msg:"Your pumpkins are ready!", seconds:30, userData:"optional"});
309
338
  //(end)
310
339
  PushNotification.prototype.createLocalNotification = function(config, success, fail) {
311
340
  exec(success, fail, "PushNotification", "createLocalNotification", config ? [config] : []);
@@ -323,25 +352,6 @@ PushNotification.prototype.clearNotificationCenter = function() {
323
352
  exec(null, null, "PushNotification", "clearNotificationCenter", []);
324
353
  };
325
354
 
326
- //Function: startBeaconPushes
327
- //[android] Starts beacon tracking
328
- PushNotification.prototype.startBeaconPushes = function(success, fail) {
329
- exec(success, fail, "PushNotification", "startBeaconPushes", []);
330
- };
331
-
332
- //Function: stopBeaconPushes
333
- //[android] Stops beacon tracking
334
- PushNotification.prototype.stopBeaconPushes = function(success, fail) {
335
- exec(success, fail, "PushNotification", "stopBeaconPushes", []);
336
- };
337
-
338
- //Function: setBeaconBackgroundMode
339
- //[android] let the plugin know that the app went to background mode (or vise versa).
340
- //Call this when going background when using beacons
341
- PushNotification.prototype.setBeaconBackgroundMode = function(on, success, fail) {
342
- exec(success, fail, "PushNotification", "setBeaconBackgroundMode", [on]);
343
- };
344
-
345
355
  //Function: setMultiNotificationMode
346
356
  //[android] Allows multiple notifications to be displayed in the Android Notification Center
347
357
  PushNotification.prototype.setMultiNotificationMode = function(success, fail) {
@@ -453,4 +463,120 @@ PushNotification.prototype.notificationCallback = function(notification) {
453
463
  document.dispatchEvent(ev);
454
464
  };
455
465
 
466
+ // Opens Inbox screen.
467
+ //
468
+ // Supported style keys:
469
+ //
470
+ // Customizes the date formatting
471
+ // "dateFormat"
472
+ //
473
+ // The default icon in the cell next to the message; if not specified, the app icon is used
474
+ // "defaultImageIcon"
475
+ //
476
+ // The appearance of the unread messages mark (iOS only)
477
+ // "unreadImage"
478
+ //
479
+ // The image which is displayed if an error occurs and the list of inbox messages is empty
480
+ // "listErrorImage"
481
+ //
482
+ // The image which is displayed if the list of inbox messages is empty
483
+ // "listEmptyImage"
484
+ //
485
+ // The error text which is displayed when an error occurs; cannot be localized
486
+ // "listErrorMessage"
487
+ //
488
+ // The text which is displayed if the list of inbox messages is empty; cannot be localized
489
+ // "listEmptyMessage"
490
+ //
491
+ // The default text color (iOS only)
492
+ // "defaultTextColor"
493
+ //
494
+ // The accent color
495
+ // "accentColor"
496
+ //
497
+ // The default background color
498
+ // "backgroundColor"
499
+ //
500
+ // The default selection color
501
+ // "highlightColor"
502
+ //
503
+ // The color of message titles
504
+ // "titleColor"
505
+ //
506
+ // The color of message titles if message was readed (Android only)
507
+ // "readTitleColor"
508
+ //
509
+ // The color of messages descriptions
510
+ // "descriptionColor"
511
+ //
512
+ // The color of messages descriptions if message was readed (Android only)
513
+ // "readDescriptionColor"
514
+ //
515
+ // The color of message dates
516
+ // "dateColor"
517
+ //
518
+ // The color of message dates if message was readed (Android only)
519
+ // "readDateColor"
520
+ //
521
+ // The color of the separator
522
+ // "dividerColor"
523
+ //
524
+ //Example:
525
+ // Pushwoosh.presentInboxUI({
526
+ // "dateFormat" : "dd.MMMM.yyyy",
527
+ // "defaultImageIcon" : 'img/icon.png',
528
+ // "listErrorImage" : 'img/error.png',
529
+ // "listEmptyImage" : 'img/empty.png',
530
+ // "listErrorMessage" : "Error message",
531
+ // "listEmptyMessage" : "Empty message",
532
+ // "accentColor" : '#ff00ff',
533
+ // "highlightColor" : '#ff00ff',
534
+ // "dateColor" : '#ff00ff',
535
+ // "titleColor" : '#ff00ff',
536
+ // "dividerColor" : '#ff00ff',
537
+ // "descriptionColor" : '#ff00ff',
538
+ // "backgroundColor" : '#ff00ff'
539
+ // });
540
+ PushNotification.prototype.presentInboxUI = function(params) {
541
+ exec(null, null, "PushNotification", "presentInboxUI", [ params ]);
542
+ }
543
+
544
+ // Show inApp for change setting Enable/disable all communication with Pushwoosh
545
+ PushNotification.prototype.showGDPRConsentUI = function() {
546
+ exec(null, null, "PushNotification", "showGDPRConsentUI", []);
547
+ }
548
+
549
+ // Show inApp for all device data from Pushwoosh and stops all interactions and communication permanently.
550
+ PushNotification.prototype.showGDPRDeletionUI = function() {
551
+ exec(null, null, "PushNotification", "showGDPRDeletionUI", []);
552
+ }
553
+
554
+ // Enable/disable all communication with Pushwoosh. Enabled by default.
555
+ PushNotification.prototype.setCommunicationEnabled = function(enable, success, fail) {
556
+ exec(success, fail, "PushNotification", "setCommunicationEnabled", [enable]);
557
+ };
558
+
559
+ // Removes all device data from Pushwoosh and stops all interactions and communication permanently.
560
+ PushNotification.prototype.removeAllDeviceData = function(success, fail) {
561
+ exec(success, fail, "PushNotification", "removeAllDeviceData", []);
562
+ };
563
+
564
+ PushNotification.prototype.isCommunicationEnabled = function(success) {
565
+ return exec(success, null, "PushNotification", "isCommunicationEnabled", []);
566
+ };
567
+
568
+ PushNotification.prototype.isDeviceDataRemoved = function(success) {
569
+ return exec(success, null, "PushNotification", "isDeviceDataRemoved", []);
570
+ };
571
+
572
+ // Indicates availability of the GDPR compliance solution.
573
+ PushNotification.prototype.isAvailableGDPR = function(success) {
574
+ return exec(success, null, "PushNotification", "isAvailableGDPR", []);
575
+ };
576
+
577
+ // Enable Huawei push notifications in Android
578
+ PushNotification.prototype.enableHuaweiPushNotifications = function() {
579
+ exec(null, null, "PushNotification", "enableHuaweiPushNotifications", []);
580
+ }
581
+
456
582
  module.exports = new PushNotification();