Reputation: 480
I've built an phone gap application for android which is now on my website. From time to time, I make updates to it, and I'll like to make users know that a new version is available.
How can I send notification update to the users of the app? I also want as user accept the notification new version start downloading.
Does anyone have any advise?
Upvotes: 1
Views: 119
Reputation: 3698
Google Cloud Messaging for Android (GCM) is a service that helps developers send data from servers to their Android applications on Android devices. This could be a lightweight message telling the Android application that there is new data to be fetched from the server (for instance, a movie uploaded by a friend), or it could be a message containing up to 4kb of payload data (so apps like instant messaging can consume the message directly). The GCM service handles all aspects of queueing of messages and delivery to the target Android application running on the target device
This document describes how to write an Android application and the server-side logic, using the helper libraries (client and server) provided by GCM.
Check this link,
http://developer.android.com/guide/google/gcm/gs.html
for client side app you can find the code here
https://github.com/marknutter/GCM-Cordova
Upvotes: 2