[firebase_messaging] Why not use FirebaseMessagingService#onMessageReceived
for receiving messages?
#17722
yorihutagalung
started this conversation in
Feature Feedback
Replies: 1 comment
-
Actually, Flutter doesn’t skip FirebaseMessagingService , the plugin still uses it under the hood. That’s where the BroadcastReceiver comes in: it catches the FCM message, then spins up a background Dart isolate and forwards the message to your Dart handler. It’s basically just a bridge between Android and Flutter. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
Does anyone know why firebase_messaging (Android) uses BroadcastReceiver instead of FirebaseMessagingService#onMessageReceived to receive messages?
According to the Android official documentation, it states that we should use
FirebaseMessagingService
, and I couldn’t find any reference to the BroadcastReceiver approach.My company is currently investigating a low notification receive rate on our flutter app compared to our native app, even though both use FCM to send notifications (via the same backend system). After reviewing the native implementation, we noticed this discrepancy and are wondering if this could be the reason why our flutter app has a lower receive rate.
Any explanation would be greatly appreciated. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions