Is there a way to add badge notifications using progressive web apps (PWA)?
According to Google Developers it is a work in progress and available as an origin trial or through the flag #enable-experimental-web-platform-features
on Chrome 73 and there is also a demo for Windows and MacOS.
Regarding other platforms:
Android is not supported because it requires you to show a notification, though this may change in the future.
While there is no information available regarding Safari or OSX.
Just in case some one comes looking for answer here
It is supported now in chrome and chromium based browsers. Here are the imp Links to know more
W3C Badging API Explainer
Demo App (installable PWA)
Demo App Source Code
Web.dev in short know how
Update 2020: check this nikhil mehta's answer below for the latest information:
The App Badging API works on Windows, and macOS, in Chrome 81 or later. It has also been confirmed to work on Edge 84 or later. Support for Chrome OS is in development and will be available in a future release of Chrome. On Android, the Badging API is not supported. Instead, Android automatically shows a badge on app icon for the installed web app when there is an unread notification, just as for Android apps.
Original answer:
Looks like this is on the roadmap, possibly behind a flag in M71.
- crbug.com/719176
- crbug.com/685159
(So, a late October beta (schedule). There's no other activity on the bug to corroborate that, but most of the WebAPK work was not on public bugs, FWIW.)