Push Notifications received but now showing

Hello guys,

I have Push Notifications implemented in my Ionic app. When I send notifications either from my backend or from Firebase console I receive notifications, “pushNotificationReceived” event is fired and callback is called but it is not shown in notification tray at all.

I am not sending data notifications there is no data property set. I already had this issue with my phone since it is very old Huawei phone but I also tried with different models from Android Studio and they act the same, I get alert (which I set in callback body to be presented when notification comes) but I nothing is shown I tray.

Any ideas why this could be happening? Thanks in advance!

Edit: I also tried scheduling Local Notification when Push Notification is received, still nothing is shown to device

How are you testing this? Are you actively in the app or is it running in the Background?

1 Like

App is opened. It is in the Foreground.

Edit: I tried when I close app(in the background). I get the notification. But how can I show notification when app is in foreground, I thought local notifications are used for that?

Local Notifications are mostly used for Schedules Push Notifications. Check out the Plugin’s Documentation, the most known ons have a Config Variable for that to show Push Notifications when App is active.

Personally i never do this, because i think you shouldn’t. In the most Apps i wrap the Push Notification to show a Toast with the same Content or show a specific Alert or something like that.

1 Like

Thanks for the tips. It makes much more sense ,when I think about it, to use toast notification when app is in the foreground since I use toast notifications for lot of notifications inside app already.

Thanks for the tips!