Skip to content
This repository was archived by the owner on Feb 7, 2019. It is now read-only.
This repository was archived by the owner on Feb 7, 2019. It is now read-only.

Update, group or remove notifications #223

Open

Description

@GuntarsLuta

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?

Activity

  1. tbozhikov commented on Jun 4, 2018

    @tbozhikov
    Contributor

    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();
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions