skip to Main Content

I’m developing a progressive web application (PWA) that will eventually send notifications to users.

I already know I’m able to send push notifications (like any regular app), as explained in the following blog post: https://developers.google.com/web/fundamentals/getting-started/codelabs/push-notifications/?hl=en-us.

I also know that I can add a PWA to the home screen, by creating a simple manifest file (https://developers.google.com/web/updates/2014/11/Support-for-installable-web-apps-with-webapp-manifest-in-chrome-38-for-Android).

However, after having the app in home screen, I would like to add a "hint" to users, letting they know that they have to access the application. A great way to do that is doing something like a "badge notification" (as showed in Facebook icon on the image below).

Image showing a badge notification example on the Facebook icon

Is it possible to add this kind of behavior using progressive web applications?


Update – December, 15th, 2018

Google recently launched a post explaining about the so called "Badging for App Icons", which is pretty exciting:

https://developers.google.com/web/updates/2018/12/badging-api

Update – September, 28th, 2018

Relevant Links:

As Josh Lee pointed out in Is there a way to add badge notifications using progressive web apps (PWA)?, there are some discussions about the subject on the chromium team.

Looking at the discussion:

FYI, the notification indicators are being pushed to M-71.

and

Thanks for the heads up. That’s fine for us because while we hope to have this testable behind a flag in M70, there’s no way we’ll be launching the API before (at least) M71.

So, maybe, at least for now, it seems that it’s not possible to add badge notifications for PWAs, but maybe in the future we’ll be able to do that.

4

Answers


  1. It is currently not possible to do this with PWAs. Although if developers like the feature I expect it will at some point.

    Login or Signup to reply.
  2. 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.

    (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.)

    Login or Signup to reply.
  3. 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.

    Login or Signup to reply.
  4. 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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search