Hacker News new | ask | show | jobs
by tjohns 4655 days ago
GCM is the recommended solution for anything that's trying to "push" data to Android: http://developer.android.com/google/gcm/index.html

We (Android) usually don't recommend developers try to implement push themselves. Using GCM allows the Android servers to schedule and collate data transmissions, so push messages from different apps get sent as part of the same transmission. Anything you roll yourself won't be able to do this.

1 comments

What about for a webapp, even an offline one? Is there a hook into GCM from Javascript or something like that?
I suppose you could use the Java-to-JS bridge, if you're using WebView inside a native app.

However, there's not really any "mobile-friendly" push solution available as part of HTML5 right now. I wish there was. There's "GCM for Chrome" (http://developer.chrome.com/apps/cloudMessaging.html), but that's both Chrome-only and only available on the desktop.