sonicboom
sonicboom

Reputation: 5028

Sending updates from server to android

What is the recommended way to send updates from a server to an Android app? I need to send data from the server that will show up in the Android notification list.

Polling the server is one option. But is there a better way? I have a website that receives updates from the same server using HTML5 Server Sent Events. Is there a way of doing something like this in an Android app, ie. creating a persistent connection that listens for server events?

Anyone know the best practise way of implementing this functionality in an Android app?

Upvotes: 0

Views: 333

Answers (1)

wtsang02
wtsang02

Reputation: 18873

Have a look at Google Cloud Messaging, this is a free service for android phones that allows server pushing. It allows you to push messages , notifications or data.


Its very hard to say if theres a best practice , it all depends what you are doing. But If you follow the example in the guide , it should be fine.

Upvotes: 3

Related Questions