You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 -
I am on Samsung Galaxy S22, Android version 13. Using @capawesome/capacitor-badge version 5.0.0
Send push notification - App badge count goes to 1. Sending more will increment that count
When App goes in background, catch that event and call Badge.clear
The push notification count does not change.
Open the App again and Set badge count to say 5 with Badge.set
Badge count goes from 1 to 5
When App goes in background again (as in 3) catch the event and call Badge.clear
The badge count goes back to 1 or 2 or 3, the number for push notifications that have come in
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: