Android `showNotificationsWhenInForeground` not working
vallemar opened this issue · 4 comments
vallemar commented
In android when i set showNotificationsWhenInForeground to true the app doesn't show the notification if it is in the foreground
firebase().messaging().showNotificationsWhenInForeground = true;jskorlol commented
I guess this issue is still not resolved, is that correct?
SingleMalted commented
I've been using local-notifications as a workaround for this for a while now.
jskorlol commented
@SingleMalted
So you solved it by displaying a message using local-notifications when receiving a message via messaging.onMessage in firebase?
SingleMalted commented
yep, basically. It checks that the app is in the foreground and is Android. If so, it schedules a local notification.
It's not ideal but it works well enough.