[英]Push notifications from windows azure mobile service to html/js web app
I want to enable push notifications on my windows azure mobile service, i have non-windows store html/js client. 我想在Windows Azure移动服务上启用推送通知,我有非Windows存储的html / js客户端。 I have searched azure documentation and i see only examples for windows store/android/ios platforms.
我已经搜索过azure文档,并且仅看到Windows store / android / ios平台的示例。 So i am kind of confused if there is a way to make it work on an html/js client or an MVC web app ?
因此,如果有办法使它在html / js客户端或MVC Web应用程序上工作,我会感到困惑。 if not is SignalR along with Rx a good approach ?
如果不是,SignalR和Rx是一个好方法吗?
Each of the mobile platforms has a push notification service. 每个移动平台都具有推送通知服务。 The web, or browsers in general don't (with the exception of some support in Safari).
网络或浏览器通常不会(除了Safari中的某些支持外)。 The setup you see in Azure Mobile is for those mobile platforms.
您在Azure Mobile中看到的设置适用于那些移动平台。
SignalR is a great way to push to connected browser clients. SignalR是推送到连接的浏览器客户端的好方法。 Using the newly released .NET back end for your Azure Mobile Service it is very easy to create and work with SignalR hubs to send out notifications.
通过将新发布的.NET后端用于Azure移动服务,可以非常轻松地创建SignalR集线器并与之配合使用以发送通知。 http://blogs.msdn.com/b/azuremobile/archive/2014/05/30/realtime-with-signalr-and-azure-mobile-net-backend.aspx
http://blogs.msdn.com/b/azuremobile/archive/2014/05/30/realtime-with-signalr-and-azure-mobile-net-backend.aspx
However, if you are using the Node.JS back end then the SignalR pieces aren't there. 但是,如果您使用的是Node.JS后端,则SignalR片段不存在。 In that case you have the option to use Socket.IO to achieve the same type of connectivity.
在这种情况下,您可以选择使用Socket.IO来实现相同类型的连接。 http://azure.microsoft.com/blog/2014/08/26/how-to-use-socket-io-with-azure-mobile-service-node-backend/
http://azure.microsoft.com/blog/2014/08/26/how-to-use-socket-io-with-azure-mobile-service-node-backend/
On the client you'll have to use some javascript to actually display the notifications. 在客户端上,您必须使用一些javascript来实际显示通知。 Toastr ( https://github.com/CodeSeven/toastr ) is a nice option [also available on nuget].
Toastr( https://github.com/CodeSeven/toastr )是一个不错的选择[也可以在nuget上使用]。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.