Closed huttj closed 9 years ago
I've also noticed this - I think it's a recent thing because I've not seen it before.
I found using the de.appplant.cordova.plugin.badge plugin to manage badges (created by the same developer).
You can wipe all badges easily after deviceready:
cordova.plugins.notification.badge.clear();
Also, works with local-notification permission request (as this request badges, sounds, and banners, you don't need to request badges through the Badges plugin also).
window.plugin.notification.local.hasPermission(function (blnHasPermissionGranted) {
if (blnHasPermissionGranted == false) {
//alert("no notification permissions")
window.plugin.notification.local.promptForPermission();
} else {
//alert("notification permissions")
cordova.plugins.notification.badge.clear();
}
});
You can also manage the icon on an individual bases:
cordova.plugins.notification.badge.set(-1) for example.
Which version are you using? In my case the badge is always "1", also if multiple notifications are deployed. As soon as I either click on one of the notifications or open the app via home screen icon, the badge disappears ...
I'm using 0.8.0dev.
The home screen icon counter/badge counts up for each notification that is deployed. However, clearing the notifications does not decrement the counter, as would be expected. The only thing that decrements the counter is tapping on the notifications.
Consequentially, the counter can be stuck at a non-zero number if any notifications are dismissed before they are tapped on.
How can I decrement the counter?