Open stib opened 2 months ago
Same here
Through observation, ShortcutBadger.applyCount(0) will lead Android system to use number of push notifications as app badge (which is og behavior). If you want to completely remove app badge, then you should call NotificationManager.cancelAll() to clear all notification before, then ShortcutBadger.applyCount(0)
Hello,
I am using shortcutBadger through the @capawesome/capacitor-badge plugin. I posted this issue in the @capawesome plugins project but was advised by the @capawesome/capacitor-badge author Robin to post the issue here. I am hoping someone is still looking at these questions here and can help address this issue.
Badge setting and clearing work fine on iOS but on Android the Badge clear does not clear the badge count coming from push notification. So if I have a App badge count of say 3 from push notifications that have come in, calling badge clear doesn't have any effect. If I set badge count to 5 through Badge.set then App badge will change to 5 and when that gets cleared through Badge.clear, the App badge count goes back to push notification count of 3. It seems like they are two different counts that the system maintains and the Badge.clear does not have any impact on the notification count for Android.
Here are more details -
The system seems to keep two different counts - one for the push notifications coming in and one that is set through Badge.set
Appreciate any thoughts/guidance on how to resolve this in clearing the count for push notifications as well.
Thanks, Sanjay.