Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to send/receive push notifications from ionic mobile app?

I have a messaging app built using the Ionic framework (on cordova). I plan on building this for android, and I'd like a way to send and recieve push notifications from the app using javascript/ionic.

Are there any good tutorials out there on how to go about setting something like this up?

like image 534
johncorser Avatar asked Jan 17 '15 20:01

johncorser


1 Answers

There is example application made available by Holly Schinsky. The core of it is the usage of PushPlugin which is the standard method to handle push notifications on Cordova. There is quite extensive tutorial provided for this subject on their documentation on that GitHub repository. The main method is pushNotification.register which registers the device to listen for push notifications.

If you instead need to trigger notification locally, you might want to take a look at Local notification plugin instead. With it you can add notifications to be shown on the device without the need for external services to send the push notifications.

like image 165
Roope Hakulinen Avatar answered Sep 28 '22 17:09

Roope Hakulinen