Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [firebase_messaging 8.0.0-dev.11 ] notification popup is showing up even when app is at foreground #4619

Closed
Nerogee opened this issue Jan 11, 2021 · 1 comment
Labels
Needs Attention This issue needs maintainer attention. type: bug Something isn't working

Comments

@Nerogee
Copy link

Nerogee commented Jan 11, 2021

Bug report

Describe the bug
A visible notification popup should not display when the app is running at foreground.

Steps to reproduce

Steps to reproduce the behavior:

Just try the official example at https://pub.dev/packages/firebase_messaging/versions/8.0.0-dev.11/example

Expected behavior

there should not be a popup when the app is running at foreground.


Additional context

7.0.3 is tested to be good. I believe this issue only happen in dev version.


Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.5, on Mac OS X 10.15.6 19G73 darwin-x64, locale en-GB)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
[✓] Android Studio (version 4.1)
[✓] Connected device (2 available)
 

• No issues found!

Flutter dependencies

Run flutter pub deps -- --style=compact and paste the output below:

Click To Expand
Dart SDK 2.10.4
Flutter SDK 1.22.5
dozenbird 1.0.7+1

dependencies:
- app_settings 4.0.4 [flutter]
- cupertino_icons 1.0.0
- dash_chat 1.1.15 [flutter flutter_parsed_text uuid intl transparent_image]
- exif 1.0.3 [args collection convert sprintf]
- firebase_core 0.5.3 [firebase_core_platform_interface flutter quiver meta firebase_core_web]
- firebase_messaging 8.0.0-dev.11 [meta flutter firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web]
- flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine]
- flutter_icons 1.1.0 [flutter]
- flutter_inner_drawer 0.5.7+2 [flutter]
- flutter_launcher_icons 0.8.1 [image args yaml path]
- flutter_local_notifications 3.0.2 [flutter platform flutter_local_notifications_platform_interface timezone]
- flutter_localizations 0.0.0 [flutter intl characters collection meta path typed_data vector_math]
- flutter_redux 0.7.0 [meta redux flutter]
- flutter_slidable 0.5.7 [flutter]
- http 0.12.2 [http_parser path pedantic]
- i18n_extension 1.4.5 [sprintf args flutter]
- image 2.1.19 [archive xml meta]
- image_picker 0.6.7+17 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface]
- package_info 0.4.3+2 [flutter]
- permission_handler 5.0.1+1 [flutter meta permission_handler_platform_interface]
- redux 4.0.0+3
- redux_saga 2.0.0 [redux]
- shared_preferences 0.5.12+4 [meta flutter shared_preferences_platform_interface shared_preferences_linux shared_preferences_macos shared_preferences_web shared_preferences_windows]
- shimmer 1.1.2 [flutter]
- simple_animations 2.4.2 [flutter supercharged sa_v1_migration pedantic]
- url_launcher 5.7.10 [flutter url_launcher_platform_interface url_launcher_web url_launcher_linux url_launcher_macos url_launcher_windows]

dev dependencies:
- flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher meta source_span stream_channel string_scanner term_glyph typed_data]

transitive dependencies:
- archive 2.0.13 [crypto args path]
- args 1.6.0
- async 2.5.0-nullsafety.1 [collection]
- boolean_selector 2.1.0-nullsafety.1 [source_span string_scanner]
- characters 1.1.0-nullsafety.3
- charcode 1.2.0-nullsafety.1
- clock 1.1.0-nullsafety.1
- collection 1.15.0-nullsafety.3
- convert 2.1.1 [charcode typed_data]
- crypto 2.1.5 [collection convert typed_data]
- fake_async 1.2.0-nullsafety.1 [clock collection]
- ffi 0.1.3
- file 5.2.1 [intl meta path]
- firebase_core_platform_interface 2.1.0 [flutter meta plugin_platform_interface quiver]
- firebase_core_web 0.2.1+1 [firebase_core_platform_interface flutter flutter_web_plugins meta js]
- firebase_messaging_platform_interface 1.0.0-dev.7 [flutter meta firebase_core plugin_platform_interface]
- firebase_messaging_web 0.1.0-dev.2 [flutter flutter_web_plugins meta firebase_core firebase_core_web firebase_messaging_platform_interface js service_worker]
- flutter_local_notifications_platform_interface 2.0.0+1 [flutter plugin_platform_interface]
- flutter_parsed_text 1.2.5 [flutter]
- flutter_plugin_android_lifecycle 1.0.11 [flutter]
- flutter_web_plugins 0.0.0 [flutter characters collection meta typed_data vector_math]
- http_parser 3.1.4 [charcode collection source_span string_scanner typed_data]
- image_picker_platform_interface 1.1.1 [flutter meta http plugin_platform_interface]
- intl 0.16.1 [path]
- js 0.6.2
- matcher 0.12.10-nullsafety.1 [stack_trace]
- meta 1.3.0-nullsafety.3
- path 1.8.0-nullsafety.1
- path_provider_linux 0.0.1+2 [path xdg_directories path_provider_platform_interface flutter]
- path_provider_platform_interface 1.0.4 [flutter meta platform plugin_platform_interface]
- path_provider_windows 0.0.4+3 [path_provider_platform_interface meta path flutter ffi win32]
- pedantic 1.9.2 [meta]
- permission_handler_platform_interface 2.0.1 [flutter meta plugin_platform_interface]
- petitparser 3.1.0 [meta]
- platform 2.2.1
- plugin_platform_interface 1.0.3 [meta]
- process 3.0.13 [file intl meta path platform]
- quiver 2.1.5 [matcher meta]
- sa_v1_migration 1.1.2 [flutter]
- service_worker 0.2.4 [js]
- shared_preferences_linux 0.0.2+4 [file flutter meta path path_provider_linux shared_preferences_platform_interface]
- shared_preferences_macos 0.0.1+11 [shared_preferences_platform_interface flutter]
- shared_preferences_platform_interface 1.0.4 [meta flutter]
- shared_preferences_web 0.1.2+7 [shared_preferences_platform_interface flutter flutter_web_plugins meta]
- shared_preferences_windows 0.0.1+3 [shared_preferences_platform_interface flutter ffi file meta path path_provider_platform_interface path_provider_windows]
- sky_engine 0.0.99
- source_span 1.8.0-nullsafety.2 [charcode collection path term_glyph]
- sprintf 4.1.0
- stack_trace 1.10.0-nullsafety.1 [path]
- stream_channel 2.1.0-nullsafety.1 [async]
- string_scanner 1.1.0-nullsafety.1 [charcode source_span]
- supercharged 1.12.0 [supercharged_dart flutter]
- supercharged_dart 1.4.0
- term_glyph 1.2.0-nullsafety.1
- test_api 0.2.19-nullsafety.2 [async boolean_selector collection meta path source_span stack_trace stream_channel string_scanner term_glyph matcher]
- timezone 0.5.9 [path]
- transparent_image 1.0.0
- typed_data 1.3.0-nullsafety.3 [collection]
- url_launcher_linux 0.0.1+4 [flutter]
- url_launcher_macos 0.0.1+9 [flutter]
- url_launcher_platform_interface 1.0.9 [flutter meta plugin_platform_interface]
- url_launcher_web 0.1.5+1 [url_launcher_platform_interface flutter flutter_web_plugins meta]
- url_launcher_windows 0.0.1+3 [flutter]
- uuid 2.2.2 [crypto convert]
- vector_math 2.1.0-nullsafety.3
- win32 1.7.4 [ffi]
- xdg_directories 0.1.2 [meta path process]
- xml 4.5.1 [collection convert meta petitparser]


@Nerogee Nerogee added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Jan 11, 2021
@Nerogee Nerogee changed the title 🐛 [firebase_messaging 8.0.0-dev.11 ] notification popup is always showing up 🐛 [firebase_messaging 8.0.0-dev.11 ] notification popup is showing up even when app is at foreground Jan 11, 2021
@Salakar
Copy link
Member

Salakar commented Jan 11, 2021

This is working as intended. See: https://firebase.flutter.dev/docs/messaging/notifications#foreground-notifications

You can control this behaviour on those APIs mentioned there.

@Salakar Salakar closed this as completed Jan 11, 2021
@firebase firebase locked and limited conversation to collaborators Feb 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs Attention This issue needs maintainer attention. type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants