0
votes

Can an Azure Notification Hubs be used to populate the Notifications area on a mobile device when the "application" is not running?

We are creating a cloud-based mechanism to notify sets of mobile devices when certain events occur server-side. The mobile devices will have our apps (ios and Android) installed and they register with our back-end service.

We want to leverage the features of APN / Firebase such that we can send something to the notifications area directly. In other words, we need to be able to send notifications to the devices regardless of whether the mobile user has started our app or not.

I've been going through the Azure Notification Hub documentation and tutorials to see how Azure Notification Hubs might help us but all of the examples have code in the mobile application that listens directly to your specific AzureNotificationHub.

Is there a way that the application can register something with an Azure Notification Hub at install time such that it's listening even though the mobile application is not currently running?

1

1 Answers

2
votes

In this sense using Notification Hubs is no different from using native push notification services (PNS) directly. Azure Notification Hubs helps you by abstracting some of the work, but it has no control over how notifications are handled by the device.

So to answer your question is -- yes, not only it's possible, but that's how push notifications work and that's their purpose. In other words, it's possible not because ANH has some magic to it that is not available otherwise, but because PNS services work in that way in the first place.

Here's a high level architecture of Notification Hubs: enter image description here

You can get started with ANH by using the step by step tutorial on sending push notifications to iOS with Azure Notification Hubs