Good news for chrome users! Google yesterday declared that it has brought up its Google cloud messaging service to Chrome browser which was available on Android only. The company is assuring that extensions and application in the browser that control GCM will use less battery and less bandwidth on user’s devices.
If you are not making use of any service like Google cloud messaging, then extensions and applications can be run proficiently by replying to events such as navigation or timers to any specific website, as well as events that happen externally of Chrome by frequently questioning a server.
The company is providing GCM to further ease this problem, but for that users must sign-in into their Google account as this service depends only on a push channel that has been developed for the signed-in users (messages are spontaneously transported to all the machines where the user has signed-in and installed the given extension and application).
If you are a developer, then you can send a message to app or extensions with these following steps:
1. pushMessaging.getChannelId(): Request a Channel id(Token Id) through Chrome.
2. Forward the returned token id to your server.
3. Post the message along with the token to the GCM server-side API, whenever you need to send a message to your app or extension.
This makes the event page to wake up and messages are then transported to app or extension in “real-time”.
If this sounds familiar, that is because the GCM first made available for Android platform last year. This GCM allows developers to send messages from their servers to the user’s Android device.
The GCM service handles all aspects of queuing of messages and delivery to the target Android application running on the target device. GCM is completely free no matter how big your messaging needs are, and there are no quotas.
This year’s Google convention is less than a week away, but seemingly the company decided it didn’t need to postpone the declaration any further. You can presume Google will be talking about up GCM for Android and Chrome both at its conference, probably with plenty of examples for developers.