开发者

Receiving pushed messages from web service

开发者 https://www.devze.com 2023-04-04 10:03 出处:网络
I am working as part of a team using Android and WP7 to create apps that communicate with a server. So ideally we want a consistent approach to receiving the data from the server.

I am working as part of a team using Android and WP7 to create apps that communicate with a server. So ideally we want a consistent approach to receiving the data from the server.

I currently am using HTTPWebRequest to form a SOAP message and send it to a Java-based web service to receive messages (Adding as a ServiceReference didn't work no matter what I tried) At the moment it's a simple case of receiving the full list of things an开发者_Python百科d just recreate the list each time via DespatchTimer to do periodic calls. But of course periodic pollin is likely to be ratehr battery intensive so not the best apporach for my needs.

I now need to change the code so that changes are pushed rather than polled. The team is looking at XMPP to do this as Android libraries are readily available to do this but I am having trouble finding open source libraries to do this.

Microsoft Push seems available but this appears to require a Microsoft based server side environment to push unless I have misinterpreted this? Or even if push notifications are a sensible way to do this.

So what I would like to know is the approach to handling pushed messages in this scenario which i hope someone out there has had experience in

Thanks


Microsoft Push Notification System [MPNS] does not require a MSFT-based server backend. It simply relays the Push Notifications through carrier or other data channels to subscribing phones. You should be able to make HTTP POST requests to MPNS at the Windows Phone subscriber Channel URI & MPNS would deliver the Push Notifications for you. Your server side can be anything, as long as you able to make the HTTP requests.

A good starting point can be found here.

Hope this helps!

0

精彩评论

暂无评论...
验证码 换一张
取 消