no9
no9

Reputation: 6544

Pushing data to android application from server using WCF REST

I need to develop an ANDROID client that will communicate with the server that runs WCF REST services.

Since I have limited experience with this I am looking a solution for:

Any ideas/hints/samples are most welcome !

Upvotes: 1

Views: 4157

Answers (2)

wsanville
wsanville

Reputation: 37506

For push notifications, check out Google's C2DM framework (cloud to device messaging). It's available on Android 2.2 and up.

Basically, the phone will maintain an open socket with Google's servers, and when you want to push data to a device, you POST a request to Google from your web app (you'd likely use System.Net.WebRequest from .NET, for example), and they handle the rest.

For more info on setting up things from your Android app, see this tutorial.

Upvotes: 2

Ladislav Mrnka
Ladislav Mrnka

Reputation: 364249

WCF doesn't have any push notification API except duplex messaging with callback channel but that is not available for REST services in WCF 4. In WCF any kind of client notification over HTTP is based with polling - you can use Comet like approach with long poll intervals.

In WCF 4.5 you will be able to use WebSockets and callback channel over HTTP but again the support for REST is up to you.

Upvotes: 1

Related Questions