Google Chrome push notifications without launching a browser

Does anyone know how to implement push notifications from the outside and without launching the browser?

+5
source share
3 answers

There are several nuances:

  • Chrome for Android . Push messages will run Service Worker and the web application, even if the browser is closed. This is a standard and ideal position on all platforms.

  • Desktop Chrome . Press Push and wake up the worker if the browser is still open. However, it will not work if the browser is closed. You can force the browser to stay open if you have the Chrome app installed, which runs in the background. In addition, we (the Chrome team) are developing how we enable this by default on Windows, Mac, and Linux.

  • Chrome for iOS : Push just doesn't work on this platform

+10
source

The Chromium blog has a post with code examples: http://updates.html5rocks.com/2015/03/push-notificatons-on-the-open-web

And also the documentation was updated: https://developer.chrome.com/apps/cloudMessaging

+1
source

You can write a Chrome extension where a background script can run if Chrome can run in the background (configured in the settings) and it can use GCM .

0
source

All Articles