4 ms·
GCM is the recommended solution for anything that's trying to "push" data to Android: http://developer.android.com/google/gcm/index.html http://developer.androi
by tjohns 13y ago
GCM is the recommended solution for anything that's trying to "push" data to Android: http://developer.android.com/google/gcm/index.html 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.
- kevinbowman 13y agoWhat about for a webapp, even an offline one? Is there a hook into GCM from Javascript or something like that?
- tjohns 13y agoI 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 http://developer.chrome.com/apps/cloudMessaging.html), but that's both Chrome-only and only available on the desktop.