mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-05-02 22:15:03 +08:00
[Android] Add the ability to remove notifications based on the tag
This commit is contained in:
@@ -112,6 +112,11 @@ public class RNFirebaseNotifications extends ReactContextBaseJavaModule implemen
|
||||
notificationManager.removeDeliveredNotification(notificationId, promise);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void removeDeliveredNotificationsByTag(String tag, Promise promise) {
|
||||
notificationManager.removeDeliveredNotificationsByTag(tag, promise);
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void setBadge(int badge, Promise promise) {
|
||||
// Store the badge count for later retrieval
|
||||
@@ -284,6 +289,7 @@ public class RNFirebaseNotifications extends ReactContextBaseJavaModule implemen
|
||||
}
|
||||
if (notification.getTag() != null) {
|
||||
androidMap.putString("group", notification.getTag());
|
||||
androidMap.putString("tag", notification.getTag());
|
||||
}
|
||||
notificationMap.putMap("android", androidMap);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user