Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can we register a web application to receive notifications from Azure Notification Hub?

I am trying to create a web application which receives notification from Azure Notification Hub.

Everywhere I only see mobile devices registering for notifications sent from back-end.

I want this web application to be used in browser and receives notification from Azure Notification Hub sent from back-end.

Thanks

like image 674
Rusty Avatar asked Oct 17 '13 10:10

Rusty


People also ask

How do I send notifications to Azure notification hub?

To set up Windows Push Notification Service (WNS): In the Azure portal, on the Notification Hub page, select Windows (WNS) from the left menu. Enter values for Package SID and Security Key. Select Save.

Can a function app bind to a notification hub to send mobile notifications as an output binding?

Azure Functions supports output bindings for Notification Hubs. Azure Notification Hubs must be configured for the Platform Notifications Service (PNS) you want to use.

What is Azure notification hub used for?

Azure Notification Hubs is a massively scalable mobile push notification engine for quickly sending millions of notifications to iOS, Android, Windows, or Kindle devices, working with APNs (Apple Push Notification service), GCM (Google Cloud Messaging), WNS (Windows Push Notification Service), and more.


2 Answers

Nope.

Azure Notification Hubs are exclusively for push notifications for mobile platforms.

If you want a code to receive a notification you shall take a look at Azure Service Bus Queues, Topics and Subscriptions. Then decide which of all to use.

It is mentioned in Notification Hubs FAQ (Do you support text message, email, or web notifications?) that you can do it by using SignalR on top of Notification Hubs :

Customers can implement this feature using SignalR on top of the supported server-side platforms.

like image 111
astaykov Avatar answered Sep 30 '22 03:09

astaykov


As mentioned in previous answers Azure's Notification Hubs only work for mobile devices because behind the scenes it interacts with the various mobile platforms' push notification services such as the Apple Push Notification Service (APNS). It is not sending the notifications directly to the client. Since there are no push notification services for websites you need another technology.

Azure offers Service Bus Queues which would work, but it also offers SignalR which is probably the best solution in your case, and in fact the one I plan to use for a web frontend I am building for my service. SignalR handles all the low level connection details for you, i.e. it takes care of using the optimal protocol for the browser you are running in which is no mean task! It's fast, scalable and surprisingly easy to implement.

like image 40
Opsimath Avatar answered Sep 30 '22 04:09

Opsimath