Skip to content

[Flutter firebase cloud messaging] - Android duplicate notifications #1840

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

Closed
sergitovar91 opened this issue Jan 20, 2020 · 1 comment
Closed
Labels
type: bug Something isn't working

Comments

@sergitovar91
Copy link

sergitovar91 commented Jan 20, 2020

I just created a new flutter project (the default project) I have followed all the step to use firebase cloud messaging library in flutter (https://pub.dev/packages/firebase_messaging) and I receive duplicate notifications only in android (ios is working fine)

Steps to reproduce the behavior:

  1. Create the default flutter project
  2. Add firebase cloud messaging library and listeners following this url https://pub.dev/packages/firebase_messaging
  3. Run the app in android

Expected behavior
Only one notification

Additional context
[✓] Flutter (Channel master, v1.14.2-pre.51, on Mac OS X 10.15.2 19C57, locale en-ES)
• Flutter version 1.14.2-pre.51 at
• Framework revision ec1044a877 (3 days ago), 2020-01-17 19:19:33 -0800
• Engine revision ecc74c966d
• Dart version 2.8.0 (build 2.8.0-dev.3.0 f96c48307d)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/sergio/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• ANDROID_HOME = /Users/sergio/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.3.1, Build version 11C504
• CocoaPods version 1.7.5

[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 42.1.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] Connected device (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)

OUTPUT
Note: /Users/sergio/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-6.0.9/android/src/main/java/io/flutter/plugins/firebasemessaging/FirebaseMessagingPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
W/FirebaseMessaging( 5781): Unable to log event: analytics library is missing
W/FirebaseMessaging( 5781): Unable to log event: analytics library is missing
I/flutter ( 5781): onMessage: {notification: {title: prueba, body: prueba}, data: {}}
I/flutter ( 5781): onMessage: {notification: {title: prueba, body: prueba}, data: {}}

Someone can help me with this ? I have been using this library and I didn't receive this bug but now it is working with the easiest project what we can do and it is not working fine.

CODE
code.txt

@sergitovar91 sergitovar91 added the type: bug Something isn't working label Jan 20, 2020
@iapicca
Copy link

iapicca commented Jan 21, 2020

Hi @sergitovar91
I see there's an open issue addressing the case you described.
Please follow up on that issue,
I'm closing the current one as duplicate.
If you disagree please write in the comments
and I will reopen it.
Thank you

@iapicca iapicca closed this as completed Jan 21, 2020
@firebase firebase locked and limited conversation to collaborators Aug 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants