Update, group or remove notifications
Hi, when app is working in background mode each received notification is displayed separately. Is there any way to group them, update or remove old notifications from status bar?
Hi @GuntarsLuta, with the current setup, this plugin does not offer this functionality. I am not sure if grouping client-side is possible at all. If you want to achieve that, maybe you should think of accumulating notifications server-side and only push a single "grouped" notification to the devices? As for the old notifications - they disappear automatically when the app is opened. Additionally, if you want to remove them before opening the app, the following APIs may help (iOS):
A possible usage in {N}:
import * as utils from "tns-core-modules/utils/utils";
const center = utils.ios.getter(UNUserNotificationCenter, UNUserNotificationCenter.currentNotificationCenter);
center.removeAllDeliveredNotifications();
center.removeAllPendingNotificationRequests();