I am struggling with PWA and badging. I added
if (navigator.setAppBadge) { navigator.setAppBadge(6); }
to the push notification method(service-worker.js) and it works fine on windows(chrome browser) but it doesn't work on android(also chrome browser). Consent to notifications granted. Are you able to advise what is wrong or what I miss or maybe android requires additional permissions?
Thanks in advance.
I tried set badge without number but it also don't work. I also check if I can add additional permission for PWA app on the Android device.
I struggled with this aswell. What i have found is that the badging api is not supported on android. Here is a quote from google:
Source (Chrome for developers)
It matches what mdn's compatibility chart says where Chrome is yellow and is noted with "Partial support. Windows and macOS only."
Source (mdn)