Push Notification with Ionic 2 and Azure Mobile Services

Dear all.
We are developing an app using Ionic 2 and with the exception of the huge changes that were required when migrating to newer versions, we found Ionic 2 very easy to use. Our app was immediately accepted on ITunes and google play.
This days we are trying to implement push notifications. As our back-end is at Azure Mobile Services, we intend to use azure’s push notification hub. However, after spending three days we are lost with a 404 error when trying to register the device on the hub.
You can find detailed explanation here:


We also developed a demo app in android to confirm everything is set up correctly apart from the client side, and indeed it is.

My questions is, does anyone of You managed to have Ionic 2 app working with azure’s push notification hub?? If so please share your experience.

1 Like

I’ve got it working for both Android and iOS. I’ve noticed some issues with iOS but I think it was primarily tied to production vs. development certificates for APNS. It definitely works though. I had to use push plugin 1.8.4 though as the current builds of the push plugin were not working with RC4.

Thanks very much for the answer.
We have implemented push notifications already, thinks are working fine but we do the device registration via the backend (implemented in .NET).

Hi @mitob and @coreyroth,

I am new to Ionic 2 (it’s been on a month or so) and completely new to Azure Notification Hubs. Therefore, looking for some easy to follow sample to implement push notification functionality for our app, but haven’t able find one.

Would appreciate if you could please provide some pointers and guidance in this regards.

Although a step-by-step would be a great help (something like what I did for Power BI Embedded in Ionic 2 here) but I know it’s too much to ask as I know you are busy. Maybe, steps in just simple English will help.

Thanks for giving your time.

Hi, I do not have much time at the moment, I can give you more concrete answers from Wensday on…
In general, the push plug in works for cordova for generating the device ID, and then we send this device ID to the backend which does the registration on the hub. Most cases you will find examples that do the registration on the hub directly from the mobile. Azzure’s plug in for this does not work. Thus we do it from the backend. In general, do not worry, you will be able to handle push notifications in no time.

Hi @mitob

Thanks for the reply, very much appreciated.

I am still trying to figure out how I can use Notification Hubs with my Ionic 2 app for Push Notifications. :frowning:
Azure’s documentation is kind of confusing…but I will keep trying.

Hi, just forget Azure’s documentation. The cordova app documentation on Azure simply does not work. Check the push notifications plugin https://medium.com/@ankushaggarwal/push-notifications-in-ionic-2-658461108c59#.4jphfmji0, first get the device token (log it in console or something), then send this token to the back-end and follow Azure’s documentation for .NET on how to register a device. https://msdn.microsoft.com/en-us/library/azure/dn530747.aspx . Good luck!

1 Like

Hi @mitob, thanks for the links. The first one really helped me understand the whole thing in a much better way than what Azure documentation was supposed to do.

I do not know .Net and that’s the problem with Azure documentation. As I soon as it talks about Visual Studio and .Net I loose my track. :frowning:

I think Azure docs does mention Node, I will check if they have the same steps that are done in .Net available for Node.js.

Hopefully, I can work it out.

Thanks again for your great help, very much appreciated.

what is the steps you followed to create azure push notification ?

Did anyone found a way to implement push notification in ionic with azure???