-
-
Notifications
You must be signed in to change notification settings - Fork 73
Description
I cancelled and cleared all my requests, yet the badge number (1) on my iPad always shows up. Even after deleting the app and re-installing it. It is stuck. I no longer have any notifications yet the badge number shows up on my app icon.
The notification clears successfully from the Notification Center, but I still have the badge number on the App icon.
Weird thing is that when I add new requests, the badge number is updated, when I delete requests, once I get to zero, I still see 1.
Also...
Shouldn't the badge number property be part of Current instead of a Request? I mean, the badge is shown on a single app icon (we only see 1 icon displayed, so shouldn't the badge number always be the total number of notification requests? Feels like that property should not even have to be editable, it should just be a read only property that equals:
var current.BadgeNumber = await LocalNotificationCenter.Current.GetDeliveredNotificationList();
I am suspecting there is a bug in a loop of some sort that doesn't clear all the way down to zero.
Ex:
Every time I add a request, I set the BadgeNumber to be the count of await LocalNotificationCenter.Current.GetDeliveredNotificationList();
So add1-> BadgeNumber = 1
Add one more -> BadgeNumber = 2
Add one more -> BadgeNumber = 3
Now, cancel a notification -> BadgeNumber goes to to 2
Cancel another -> BadgeNumber goes to 1
Cancel the last one, -> Badge number is stuck on 1, even weider, sometimes goes back up to 2??
How can I clear the app icon badge once I have removed all my notifications?
Running on Visual Studio 2022 Preview on a Windows 11 machine
Targeted device is an iPad 10th Generation