Flutter: FCM not sending notifications on android release

Fcm notifications used to work like a charm but in my last 2 releases, they do not work in any way. I do not have my app released to the App Store yet so I am not sure if the problem is about the whole project or just about android. I am not really sure where the problem is.

this is my flutter doctor output:

[✓] Flutter (Channel stable, 1.22.4, on Mac OS X 10.15.7 19H2 darwin-x64, locale en-TR)
    • Flutter version 1.22.4 at /Users/adnanfahed/flutter
    • Framework revision 1aafb3a8b9 (12 days ago), 2020-11-13 09:59:28 -0800
    • Engine revision 2c956a31c0
    • Dart version 2.10.4

 
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/adnanfahed/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.2, Build version 12B45b
    • CocoaPods version 1.10.0

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin installed
    • Dart plugin version 201.9245
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.51.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.16.0

[✓] Connected device (1 available)
    • iPhone (mobile) • 7c0edb93134cbbf0493eb34ada73e295cffa68cf • ios • iOS 14.2

1 answer

  • answered 2020-11-25 06:54 biruk IS

    you have to register release sha-1 key to firebase console. on terminal write cd android then gradlew signingreport this command will show you your keys. register the key that says release sha-1 and it will work.