I'm able to see the notification in system tray when the app is in Background.
But, I would like the notification to be visible in system tray even if the app is in Foreground.
I tried the following on Android:
- Sending notification from Firebase console: I can see the notification in system tray only when the app is in background.
- Sending a post request to
https://fcm.googleapis.com/fcm/send
as described here with bothdata
andnotification
paylods: Again, I can only see the notification in system tray when the app is in background.
This document mentions:
Messages with both notification and data payload, both background and foreground. In this case, the notification is delivered to the device’s system tray, and the data payload is delivered in the extras of the intent of your launcher Activity.
What am I missing?
I'm using Android and Cordova/Ionic.