Google is now giving developers the ability to build push notifications into web apps for its Chrome browser.
The new Google Cloud Messaging Service for Chrome (GCM) allows web developers to send messages to Google’s servers, which then pass it on in real time to those using the browser. This means news services will be able to send instant alerts regarding breaking items in the same way that they’re able to facilitate users of Android apps with the latest information.
The same will apply for stock prices, weather services and sports scores; with the alert prompting an action in the browser like the opening of a web page or even a simple message notification (depending on the user’s preference).
In a recent post on Google’s Chromium Blog, it was stated that the roll out of GCM (which was announced for Android at Google I/O last year) for Chrome would make life easier for app and extension developers. In the current system, web apps are constantly polling their own servers to see if an update is ready, which wastes bandwidth and user battery life, Google noted.
Product manager Mark Scott posted:
“Event pages keep apps and extensions efficient by allowing them to respond to a variety of events such as timers or navigation to a particular site, without having to remain running persistently. But what if you need to respond 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? Until now, you had to do this by repeatedly polling a server. This process consumed bandwidth and reduced the battery life of your users’ machines.”
In order to make use of the new push notifications feature, users of Chrome will have to remain signed into their Google accounts.