0

I am using Ionic 2 to build a Chat App. The Chat App is using Ionic and Meteor and works perfectly. The app has an event that is fired when a new message appears (when Meteor updates the Mongo cursor).

I am considering using either Local Notifications or Push Notifications. I would prefer Local Notifications, because they are simpler and I already have an event when I need a notification.

Question

My question however is, if the app is not running, will it still be able to display a notification if I use Local Notification?

Hardik Vaghani
  • 2,163
  • 24
  • 46
Richard
  • 8,193
  • 28
  • 107
  • 228

1 Answers1

0

yeah local notification plugin run as a service in background.

Sajed
  • 445
  • 1
  • 8
  • 19
  • Thanks SaJed. Does that mean it will work if I close the app? – Richard Sep 20 '16 at 05:47
  • I have just tested it. It does not work while the app is not running. If you open the app, then press the home button it works. But if you start your phone, and never launch the app, it does not run. As a result I need to implement Push Notifications via a service like Googles Firebase. – Richard Sep 20 '16 at 08:36
  • good testing point. you are right this method needs to run once. however notification need a hub and you may use 3rd party hub like google and firebase or program yourself and register all users device ID. – Sajed Sep 20 '16 at 09:24