Saturday, 16 November 2019

What can be the reason behind the failure of setShowBadge(false)?

I am posting a notification for a background task and bring it to foreground with startForeground with a visible ongoing notification. When it completes, I replace it with a cancellable notification using the same notification id and the same channel I created with setShowBadge(false).

The scenario works correctly: It does not show badge for the ongoing task and it is successfully replaced with the non-ongoing version. Except, setShowBadge(false) does not work when I use it for the cancellable notification.

I checked the official sample and many examples and I also checked my code, I could not find any problems. So, there has to be an exceptional situation here. What can be the problem? What am I possibly missing here?



from What can be the reason behind the failure of setShowBadge(false)?

No comments:

Post a Comment