File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed
android/src/main/java/com/dieam/reactnativepushnotification/modules Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -211,6 +211,16 @@ public void cancelAllLocalNotifications() {
211
211
mRNPushNotificationHelper .clearNotifications ();
212
212
}
213
213
214
+ @ ReactMethod
215
+ /**
216
+ * Remove all delivered notifications from Notification Center
217
+ *
218
+ * @see <a href="https://facebook.github.io/react-native/docs/pushnotificationios.html#removealldeliverednotifications">RN docs</a>
219
+ */
220
+ public void removeAllDeliveredNotifications () {
221
+ mRNPushNotificationHelper .clearNotifications ();
222
+ }
223
+
214
224
@ ReactMethod
215
225
/**
216
226
* Cancel scheduled notifications, and removes notifications from the notification centre.
Original file line number Diff line number Diff line change @@ -46,6 +46,10 @@ NotificationsComponent.prototype.cancelAllLocalNotifications = function() {
46
46
RNPushNotification . cancelAllLocalNotifications ( ) ;
47
47
} ;
48
48
49
+ NotificationsComponent . prototype . removeAllDeliveredNotifications = function ( ) {
50
+ RNPushNotification . removeAllDeliveredNotifications ( ) ;
51
+ } ;
52
+
49
53
NotificationsComponent . prototype . presentLocalNotification = function ( details : Object ) {
50
54
RNPushNotification . presentLocalNotification ( details ) ;
51
55
} ;
Original file line number Diff line number Diff line change @@ -300,6 +300,10 @@ Notifications.cancelAllLocalNotifications = function() {
300
300
return this . callNative ( 'cancelAllLocalNotifications' , arguments ) ;
301
301
} ;
302
302
303
+ Notifications . removeAllDeliveredNotifications = function ( ) {
304
+ return this . callNative ( 'removeAllDeliveredNotifications' , arguments ) ;
305
+ } ;
306
+
303
307
Notifications . setApplicationIconBadgeNumber = function ( ) {
304
308
return this . callNative ( 'setApplicationIconBadgeNumber' , arguments ) ;
305
309
} ;
You can’t perform that action at this time.
0 commit comments