1

I’ve looked in multiple places, but cannot find details of how to register a web site against a notification hub for the sending and receiving of push messages.

The only like examples I have seen use a custom Node.js server for the web site to interact with.

Would really prefer to use a hub so we can send tagged messages to our browser app at the same time as our native apps.

TylerH
  • 20,799
  • 66
  • 75
  • 101
RoyCorneloues
  • 11
  • 1
  • 5
  • Does this answer your question? [Can we register a webapplication to recieve notification from azure notification hub](https://stackoverflow.com/questions/19423694/can-we-register-a-webapplication-to-recieve-notification-from-azure-notification) – Cirelli94 Feb 14 '20 at 15:12

1 Answers1

2

It sounds like you want to register a web application to Azure Notification Hub to receive notification message. A web application can be as backend to send notification message using SDK in different languages like .NET, Node.js, Java, PHP, and Python. But the answer to receive notification message from web is absolutely not, there is an answer of the exising SO thread Can we register a webapplication to recieve notification from azure notification hub which has answered it.

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

Only one exception is Google Cloud Messaging (GCM) supports Chrome Apps, please see the tutorial Tutorial: Push notifications to Chrome apps with Azure Notification Hubs

For sending and receiving Push Notification in browser, the only way is using Web Push API, you can refer to my answer of this SO thread Azure browser push notification for chrome, firefox ,and safari browser. And there is a Mozilla cookbook site for Web Push to show some examples to help getting started. Then, you can host your web push server on Azure. These Mozilla examples' backend are all using JavaScript based on Node.js, you can get the other web push libraries at this GitHub org web-push-libs if you want to use other languages.

Peter Pan
  • 23,476
  • 4
  • 25
  • 43
  • Thanks for this. However your statement isn't strictly true. Notification Hubs also support the Universal Windows Platform - which means Windows 10 apps. And seeing how MSFT doesn't have a "mobile" platform any more, Notification Hubs do indeed support a desktop OS - Windows! – RoyCorneloues Jan 15 '19 at 15:02
  • Notification Hubs support Windows at the OS level. The Push API must be implemented at the OS level, so that messages can be received to the action centre even when the browser is closed. How is this any different from a mobile/UWP app? – RoyCorneloues Jan 15 '19 at 15:04