Push Notifications for Ionic Framework


Back again. I’m writing a mobile application for Android and iOS using ionic framework. It is working well so far as I have the flexibility I want to write it. I’ve come up to the point of having to add push notifications and chose to use the Azure Notification Service seeing as I’m hosting everything else in Azure too.

I’ve followed the examples in the repo as suggested by Microsoft here but they are out of date. They are all for Ionic 4 and it is now Ionic 6. The phone-gap plugin is now out of support and the example code doesn’t work (due to the fact that the framework has now moved on).

I’m hoping and praying that someone has an example they could share of how to achieve this.

Thanks in advance.


Maybe it’s not the best solution, but it works:

In case you cannot manage to get Azure Notification Service working, you can connect your Azure service to Google push notifications API.

You only have to make a post request to https://fcm.googleapis.com/fcm/send.


Here you have an example that I’ve used:


curl -d '{
   "notification": {
}' \
-i -H "Application/json" \
-H "Content-type: application/json" \
-H "Authorization: key=MY_SECRET_KEY" \
-X POST https://fcm.googleapis.com/fcm/send

Then, to receive the notifications by cordova, you can use this library:


Answered By – Miguel

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published