Firebase does not deliver the fcm notification to the app in the foreground #12360
Unanswered
haidarmehsen
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a flutter app that listens to firebase notifications in the foreground, using
FirebaseMessaging.onMessage.listen
.I could reproduce a scenario where the listener does not get invoked even though the device is receiving the token (I can see it in adb logcat, more on that below).
Scenario 1
onMessage
is invoked.notice the lines
and
Scenario 2
onMessage
is not invoked), but as you can see from logs below it was received by the device but for some reason not propagated to the appfocus at the line
More information
I even checked the firebase event log on the device by running
adb shell am start -n com.google.android.gms/.gcm.GcmDiagnostics
, I can see the logs say that something is received on the device instantly when I send a message from the server, but the app is not receiving the notification still.Question is why is this happening and how to solve it?
This is even happening for release versions of the app (the release versions are distributed through an apk and not playstore, and also the app in release version is runnnig in kiosk mode using airdroid mdm which prevents the app from closing, so the app is in foreground the whole time)
Beta Was this translation helpful? Give feedback.
All reactions