Sending Push Notifications with Azure Notification Hub

Dominic Burford
Jan 25, 2019 · 2 min read

In the latest version of the Xamarin Forms app that I am working on, we wanted to send push notifications to the devices. There were a couple of approaches that we could have taken. The key ones being Twilio (which we are already using for sending SMSmessages) and Azure Notification Hub. After some initial exploration, the clear choice was Azure Notification Hub. Unsurprisingly it had tight integration with Xamarin Forms and the Microsoft ecosystem, and was very straight-forward to configure and get working.

There were also very good examples of how to make the necessary code changes to the respective Android and iOS projects to ensure we got this working quickly.

The beauty of working with Azure Notification Hub, is that this abstracts us away from the underlying details of the Android and iOS platforms. Instead, once we had made the necessary configurations and setup changes to enable push notifications for each platform, we then integrated the platform specific push notification engines into Azure Notification Hub. From this point onwards, we only have to work with Azure Notification Hub. This gives us a far simpler and cleaner abstraction onto our notification setup.

It is very simple to setup and send test push notifications to your registered devices using Azure Notification Hub. We have also intergrated App Center event tracking for all device registrations and sending of push notifications. This gives us a helicopter view of what our code is doing under the hood, and to help us diagnosing any errors should they arise.

The step-by-step tutorials I used can be found here[^].

So if you’re looking to implement push notifications in your mobile app, give Azure Notification Hub a try.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store