How to remove badge using: cordova-plugin-local-notifications


#1

Hello, I have managed to add local notifications. Now i set badge to 1. using https://github.com/katzer/cordova-plugin-local-notifications/wiki/04.-Scheduling

but now when i open the app I want to clear this badge. How can i do this ?


#2

Doc says:

badge Number The number currently set as the badge of the app icon in Springboard (iOS) or at the right-hand side of the local notification (Android)

  • Default: 0 (which means don’t show a number)

#3

Can give me more detail please? I tried $cordovaLocalNotification.clear(id, {badge:0}) and $cordovaLocalNotification.update({id:2,badge:0}) but both seemed to do nothing.

I want to clear the badges when the user reassume the app or when they click on the item that they want to get notify on.


#4

nvm, i am an idiot lolz. I used other plugin to clear it, it works well with the local notification.

this is the plugin I used.