When a progressive web app (with service worker) shows a notification, the notification displayed in the notification drawer has the icon that I supply and looks fine.
However, when the drawer is closed, the status bar icon associated with that notification is specific to Chrome, shown here in the red circle. This happens whether viewed as a web page or when added to the home screen and running with display "standalone".
Is there any way for a PWA to specify the icon that shows in the status bar?
Turns out that the
options
for theshowNotification
method can have bothicon
andbadge
. The badge shows as the system icon, and the icon shows in the notification message.Finding documentation for this is not easy, but https://notifications.spec.whatwg.org/ gave enough clues to figure this out.
Pointers to good (current) documentation about this would be appreciated!