Click here to Skip to main content
15,890,043 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
hello every one
i want to know that how to implement any notification are arrised on the server so how to notify to client any update are arrised ???
thanks in avance
Posted
Updated 27-Dec-14 9:57am
v2
Comments
Richard MacCutchan 27-Dec-14 15:38pm    
What server, what client? How are they connected? Please provide a more detailed explanation of your problem.
Mehul Tank 3-Jan-15 5:14am    
means i have created one news application so whenever update any news on the server so at that time notify to user new content add on the apllication
King Fisher 27-Dec-14 15:58pm    
elaborate your Question
Mehul Tank 3-Jan-15 5:14am    
means i have created one news application so whenever update any news on the server so at that time notify to user new content add on the apllication .

1 solution

You have multiple ways to do that.

First way is to poll the server to ask for update. This solution isn't really efficient and lot of params are had to choose: Time to update-> will affect battery and re-activity.

Second way is to use Google Cloud Messaging(GCM). It provides a solution to push data from server to user. It's really simple to implement. Check android documentation: http://developer.android.com/guide/google/gcm/index.html[^].This will optimizes battery and you could receive push even if your app is off.
 
Share this answer
 
Comments
Mehul Tank 3-Jan-15 5:15am    
thank you i will try it

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900