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

前端 未结 4 1063
眼角桃花
眼角桃花 2021-02-05 20:32

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

4条回答
  •  太阳男子
    2021-02-05 20:54

    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.

提交回复
热议问题