0

I am working on an Ionic 5 Android App, I need a solution for an event call when Google FCM notification received on mobile, it is working when the app is Open and Running, but the event is not calling when the app is running in the background or closed, I do receive the Google FCM notification but the event is not executing, below is the event code. Need help so that this event can be called if the app is running in the background or closed when FCM notification received.

console.log('Subscribing to new notifications');
this.fcm.onNotification().subscribe((payload) => {
  this.pushPayload = payload;
  console.log('onNotification received event ');
});
Waseem
  • 291
  • 1
  • 6
  • 20
  • Does this answer your question? [How to handle notification when app in background in Firebase](https://stackoverflow.com/questions/37711082/how-to-handle-notification-when-app-in-background-in-firebase) –  Feb 13 '21 at 19:35
  • share your Notification `PayLoad` data. – Najam Us Saqib Feb 15 '21 at 04:52

0 Answers0