Flutter Local Notifications for Android

96 views
Skip to first unread message

Mohamad El Bohsaly

unread,
May 17, 2021, 8:16:28 AM5/17/21
to Flutter Development (flutter-dev)
I keep receiving in my console: broadcast received for message upon firing a notification whilst the app is in the foreground.

Flutter 2.0.6
Android Emulator

Suzuki Tomohiro

unread,
May 17, 2021, 9:00:59 AM5/17/21
to Mohamad El Bohsaly, Flutter Development (flutter-dev)
Is that a problem?

--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/950f4555-5699-4325-9ea7-fd8f97ec9212n%40googlegroups.com.

Mohamad El Bohsaly

unread,
May 17, 2021, 9:03:21 AM5/17/21
to Suzuki Tomohiro, Flutter Development (flutter-dev)
The foreground notification isn't showing for Android emulator.

Genuine wishes,

Mohamad El Bohsaly


Suzuki Tomohiro

unread,
May 17, 2021, 10:54:17 AM5/17/21
to Mohamad El Bohsaly, Flutter Development (flutter-dev)
Does that defy its documentation? I remember some notifications do not appear when the app is in foreground.

Mohamad El Bohsaly

unread,
May 18, 2021, 3:52:11 AM5/18/21
to Suzuki Tomohiro, Flutter Development (flutter-dev)
You can override them. But that's not working with me.

Genuine wishes,

Mohamad El Bohsaly


Suzuki Tomohiro

unread,
May 18, 2021, 7:32:37 AM5/18/21
to Mohamad El Bohsaly, Flutter Development (flutter-dev)
Can you share the documentation?

Mohamad El Bohsaly

unread,
May 18, 2021, 7:40:42 AM5/18/21
to Suzuki Tomohiro, Flutter Development (flutter-dev)

Suzuki Tomohiro

unread,
May 18, 2021, 7:49:51 AM5/18/21
to Mohamad El Bohsaly, Flutter Development (flutter-dev)
Nice. Here is what you have to do:

If your own application is in the foreground, the Firebase Android SDK will block displaying any FCM notification no matter what Notification Channel has been set. We can however still handle an incoming notification message via the onMessage stream and create a custom local notification using flutter_local_notifications

Reply all
Reply to author
Forward
0 new messages