Sign in with
Sign up | Sign in

Google Adding Push Notification Support in Chrome

By - Source: Google | B 4 comments

Push notification support has arrived for Web apps for Chrome and Chrome OS.

Chrome product manager Mark Scott said on Friday that the team has launched Google Cloud Messaging for Chrome and Chrome OS, a push notification system that allows Chrome Web apps and extension developers to wake up their apps remotely and/or send alerts to users. It follows the Android version which was launched back in 2012 during Google I/O.

This new Chrome push notification system is a step forward in helping browser-based Web apps catch up with native software that already sends notifications directly to the user. As an example, this new system could allow a calendar app to push updates to the user even when it's not open, or a stock app to alert the user of current prices in "near real time".

Prior to launching this service for Chrome, responding to something that occurs outside of Chrome -- such as a news alert, a message sent to a user or a stock hitting a price threshold – could be accomplished by repeatedly polling a server. However this process not only consumes bandwidth, but reduces battery life if the user is on a Chromebook or laptop.

However Google Cloud Messaging relies on an efficient push channel that’s only established for signed-in users. Messages are automatically delivered to all the devices where the user has signed in and installed the supporting app or extension.

Once the user installs the compatible Web app or extension "client", it requests the user's channel ID and sends the information to the developer's server. When the time comes to alert the user with a message, it's sent from the server to the push messaging service which pipes the message to all instances of Chrome where the user is signed in.

"When the app or extension starts, it needs to register a handler to receive the pushMessaging.onMessage event," Google states. "When the message arrives on the client, Chrome starts the app or extension, if it is not already running, and calls the registered handler."

News of the new push notification system arrives just before the launch of Google I/O 2013 which takes place next week. The new feature will undoubtedly make Chrome OS feel more like a native platform despite its web-based roots. A new wave of Chromebooks is expected to be revealed next week during the opening three-hour keynote along with a possible string of Android-based notebooks.

Display 4 Comments.
This thread is closed for comments
  • -1 Hide
    s3anister , May 12, 2013 5:28 AM
    Glad I don't use Chrome. Push Notification might be one of the worst things to ever happen to notifications; I don't know if this goes for everyone but I get literally nothing but ads on android.
  • 2 Hide
    weierstrass , May 12, 2013 7:33 AM
    s3anister you have completely missed the point and the necessity of push notification.
  • 0 Hide
    wifiwolf , May 13, 2013 7:37 AM
    @S3anister: I've been using android since its early stages, you only get those ads if you install dodgy apps or apps that clearly state they will do so.
    Now on topic, this is exactly what I was hoping for since using phonegap and other sofware to work on web apps, you always need much more effort to enable "real" push notifications than to make your app, which is highly inefficient. Can't wait to try it out
  • 0 Hide
    John05 , May 22, 2013 12:59 PM
    I am trying to work with the Google Cloud Messaging, but I can not get the Channeld, I get the following error Error during pushMessaging.getChannelId: 3
    chromeHidden.handleResponse, I don't know what is happennign, I am lost, I am using arch linux and my app is on chromium, I don't know if there is an incompatibility or something that I am missing, please if you can give some tip I would be grateful.
Tom’s guide in the world
  • Germany
  • France
  • Italy
  • Ireland
  • UK
Follow Tom’s guide
Subscribe to our newsletter