How Can I Get Data To Be Pushed From The Database To The Client, Like A Messenger Service?
Solution 1:
Yes, what you are suggesting is named "polling" => check if the server has some updates each 10sec or something like that. You're right, it's evil (drains the battery, use a lot of bad=ndwidth, etc.)
What you need is a "push" service. If you are working with Android, the easiest way of doing it is to use GCM (Google Cloud Messaging) : http://developer.android.com/google/gcm/index.html
This little guy will provide you a way of notifying all the devices that theure have been some changes on the server.
It's pretty well done (if it can't reach the devices, it will try again with an exponential time delay, etc.).
Solution 2:
You can use google cloud messaging service to send notification in device so please register your application on google service all step are cover below link. Open below link and follow step
Post a Comment for "How Can I Get Data To Be Pushed From The Database To The Client, Like A Messenger Service?"