如何从 Windows Phone 7 向 .NET Winform 应用程序发送推送通知
请原谅我这个白痴问题。 据我所知,我们可以向 Windows Phone 7 发送推送通知。
就像在我们的例子中,我们将原始推送通知发送到在 Windows Phone 7 上运行的应用程序,并根据该通知,应用程序做了一些工作。之后,用户执行了一些操作,该操作应该与我们的主 Winform 应用程序进行通信。
我们怎样才能实现这个功能呢?我们如何接收从 Windows Phone 7 返回到 .NET Winform 应用程序的通知。
谁能分享一下他们的经验。
谢谢
please forgive me for this idiot question. I understood that we can send push notifications to windows phone 7.
Like, in our case we sent the Raw push notification to our application running on Windows Phone 7 and based on that notification the application did some work. Now after that the user did some action which is suppose to communicate back to our main Winform application.
How can we achiver this functionality? How can we receive the notification back from Windows Phone 7 to .NET Winform application.
Can anybody share thier experience.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
推送通知只能发送至 WP7 应用程序。
如果您想调用另一个应用程序(在另一台计算机/服务器上),您必须从 WP7 应用程序发出 HTTP(或套接字)请求。如果您希望将其发送到 PC 上的应用程序,则需要通过 Web 端点路由消息。此类消息的格式、发送和传递完全取决于您。目前 SDK 中没有可用的服务来执行此操作。
Push notifications can only be sent TO a WP7 app.
If you want to call another app (on another machine/server) you'll have to make a HTTP (or socket) request from the WP7 app. If you want that to go to an app on a PC you'll need to route the message via a web endpoint. The format, sending and delivery of such messages are entirely up to you. There is no service currently available in the SDK to do this.
您可以添加 Windows Phone 应用程序可以调用的基于 http 的 wcf 服务。并让 wcf 服务将数据推送到消息队列(MSMQ、RabbitMQ),您的窗口窗体将侦听该消息队列以获取响应
You could add a http based wcf service that your windows phone app can call. And let the wcf service push data to a message queue(MSMQ, RabbitMQ) which your window form will be listening to for response