3

I am trying to build an Ionic 3 app that works similar to SMS app where it will get the messages from google FCM push notification and store it the local sqlite DB and notify the user . When you launch the app it will check and display all messages you got from the local SQLite DB .

After researching and reading the docs it explains that when you send Data Type push notification and the app is in foreground it will handle it via ( on("Notification") ) while in the background or closed the user will get a notification and when tapped( and only when the user taps it ) the app will run and the "on" function will be called .

Is there a way even when the app is in the background or closed that I can handle the Data push notification and extract the message and store it in the SQLITE and display the notification So even if the user did not tap on the notification the message won't be lost and when he later opens the app he will see the message received .

Thanks a lot !

Nitro
  • 73
  • 1
  • 6

0 Answers0