Open rossholdway opened 4 years ago
Is there any workaround with the current LocalNotifications plugin?
Unfortunately not that I can see from the Capacitor local notifications docs
@rossholdway - Did you find another solution? I did not find proper documentation how to use the Cordova plugins unfortunately ... (see https://github.com/ionic-team/capacitor/issues/2195).
@scriptPilot No, sorry haven't found another way to do this currently.
This looks promising: https://github.com/katzer/cordova-plugin-badge
Haven't tried it yet, but intend to.
Los problemas etiquetados con solicitud de función se cierran, pero se realiza un seguimiento de las reacciones para medir el interés.
Tenga en cuenta que esto no es compatible oficialmente con Android. Solo es posible en unos pocos proveedores. Hay una biblioteca de terceros para manejar los llamados shortcutBadger y no planeamos agregar esa dependencia solo para esta función, así que creo que encaja mejor en un complemento de terceros
Any update for this feature request..? Because if anybody remove a notification from notification center the badge count will not update with Badge.set from Badge plugin because it isn't in foreground and a background task for this is not optimal.
Alternatively please add a new event for Local Notification Plugin if an notification is removed so we can listen on it on an background task.
If anyone is still looking for solution, take a look at this plugin: https://github.com/capawesome-team/capacitor-plugins/tree/main/packages/badge
Feature Request
Describe the Feature Request
iOS (and some Android) notification payloads often contain the number of unread notifications, however currently this value can't be used. Support setting and getting the notification badge count by implementing
getBadgeCount
andsetBadgeCount
methods.I notice this feature has been mentioned in other issues too (#1301 ionic-team/capacitor#837 etc). It is also currently a supported feature of the phonegap push plugin. See
push.setApplicationIconBadgeNumber
andpush.getApplicationIconBadgeNumber
at https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/API.mdPlatform Support Requested
Describe Preferred Solution
Add
getBadgeCount
andsetBadgeCount
methods