pushwoosh-react-native-plugin 6.1.8 → 6.1.9
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/index.js +11 -0
- package/package.json +1 -1
- package/pushwoosh-react-native-plugin.podspec +1 -1
- package/src/android/build.gradle +1 -1
- package/src/android/src/main/java/com/pushwoosh/reactnativeplugin/PushwooshPlugin.java +9 -0
- package/src/ios/PushwooshInboxBundle.bundle/Info.plist +0 -0
- package/src/ios/PushwooshInboxBundle.bundle/PWIInboxAttachmentViewController.nib +0 -0
- package/src/ios/PushwooshInboxBundle.bundle/PWIInboxMessageViewCell.nib +0 -0
- package/src/ios/PushwooshInboxBundle.bundle/PWIInboxViewController.nib +0 -0
- package/src/ios/PushwooshPlugin/Pushwoosh.m +5 -0
- package/src/ios/libPushwooshInboxUI.a +0 -0
package/index.js
CHANGED
|
@@ -72,6 +72,17 @@ class PushNotification {
|
|
|
72
72
|
PushwooshModule.clearLocalNotification();
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
//Function: clearNotificationCenter
|
|
76
|
+
//Clears all existing and cancels all pending notifications
|
|
77
|
+
//
|
|
78
|
+
//Example:
|
|
79
|
+
//(start code)
|
|
80
|
+
// Pushwoosh.clearNotificationCenter();
|
|
81
|
+
//(end)
|
|
82
|
+
clearNotificationCenter(){
|
|
83
|
+
PushwooshModule.clearNotificationCenter();
|
|
84
|
+
}
|
|
85
|
+
|
|
75
86
|
//Function: register
|
|
76
87
|
//Call this to register for push notifications and retreive a push Token
|
|
77
88
|
//
|
package/package.json
CHANGED
package/src/android/build.gradle
CHANGED
|
@@ -281,6 +281,15 @@ public class PushwooshPlugin extends ReactContextBaseJavaModule implements Lifec
|
|
|
281
281
|
LocalNotificationReceiver.cancelAll();
|
|
282
282
|
}
|
|
283
283
|
|
|
284
|
+
@ReactMethod
|
|
285
|
+
public void clearNotificationCenter() {
|
|
286
|
+
if (AndroidPlatformModule.getManagerProvider() != null) {
|
|
287
|
+
if (AndroidPlatformModule.getManagerProvider().getNotificationManager() != null) {
|
|
288
|
+
AndroidPlatformModule.getManagerProvider().getNotificationManager().cancelAll();
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
284
293
|
@ReactMethod
|
|
285
294
|
public void setApplicationIconBadgeNumber(int badgeNumber) {
|
|
286
295
|
PushwooshBadge.setBadgeNumber(badgeNumber);
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -472,6 +472,11 @@ RCT_EXPORT_METHOD(clearLocalNotification){
|
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
474
|
|
|
475
|
+
RCT_EXPORT_METHOD(clearLocalNotification){
|
|
476
|
+
[PushNotificationManager clearNotificationCenter];
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
|
|
475
480
|
RCT_EXPORT_METHOD(enableHuaweiPushNotifications) {
|
|
476
481
|
// available in Android only
|
|
477
482
|
}
|
|
Binary file
|