简体   繁体   English

将Windows Azure Azure移动服务中的通知推送到html / js Web应用程序

[英]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.

相关问题 是否可以从ASP.NET MVC4表单向Windows Azure移动服务发送推送通知 - Is it possible to send push notifications from an ASP.NET MVC4 form to windows azure mobile services 如何使用 Azure AD 向 web 服务验证移动应用程序? - How to authenticate mobile app to web service using Azure AD? Service Fabric上的Azure移动应用 - Azure Mobile App on Service Fabric Azure移动应用服务中的异常处理 - Exception Handling in Azure Mobile App Service Windows Azure Service Bus通知中心仅接收部分通知 - Windows Azure Service Bus Notification Hub Only Receiving Portion of Notifications 从Windows服务在.NET MVC Web应用程序中执行操作 - execute an action in a .NET MVC Web App from a Windows Service Azure App Service Web App编译错误 - Azure App Service Web App compilation error 如何使用Microsoft Azure在移动应用程序中发送推送通知? - How to send push Notification in Mobile App using Microsoft Azure? 如何在不发送客户端请求的情况下从Windows Azure服务器向客户端移动应用(iOS)发送消息? - How to send a message from a windows azure server to a client mobile app(iOS) without the client sending any request? Windows目录中的Azure Web App引用DLL - Azure Web App Referencing DLL in Windows Directory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM