I am trying to reset the application icon badge number for a notification in my game, but I do not know the correct way to do so. Is setting the applicationIconBadgeNumber of the notification to 0 a way? Because I tried that and the badge did not go away.
It is using LocalNotification. Here is how I display the notification:
LocalNotification notif = new LocalNotification(); notif.fireDate = energyRefillTime.Value; notif.alertBody = "You have more lives!"; notif.alertAction = "The wait is over!"; notif.soundName = LocalNotification.defaultSoundName; notif.applicationIconBadgeNumber = 1; NotificationServices.ScheduleLocalNotification(notif);
Here is how I am trying to reset and clear the application icon badge number:
notif.applicationIconBadgeNumber = -1;
I have also tried:
Both have not worked.
Please help! Thank you in advance.