i have issue in notification when i open app and receiving notification from firebase its working
but when i out of app and receiving notification from firebase i get this issue
Missing Default Notification Channel metadata in AndroidManifest. Default value will be used
my code
Future _showNotificationWithDefaultSound(String t, String b,String id) async {
var androidPlatformChannelSpecifics = new AndroidNotificationDetails(
'your channel id', 'your channel name', 'your channel description',
importance: Importance.Max, priority: Priority.High);
var iOSPlatformChannelSpecifics = new IOSNotificationDetails();
var platformChannelSpecifics = new NotificationDetails(
androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics);
await flutterLocalNotificationsPlugin.show(
int_notification,
t,
b,
platformChannelSpecifics,
payload: 'Default_Sound',
);
}
my Manifiest.xml
<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="default_notification_channel_id"/>
@Mostafa-SA-developer
The issue at https://github.com/flutter/flutter/issues/39075 has been closed and moved here. Future collaboration on this issue will be done here.
Same issue here. I tried to add the following to Manifest.xml but with no chances.
<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="default_notification_channel_id"/>
As a result, the code that should be executed by onBackgroundMessage is not executed.
Hope this can be fixed
Hi @Mostafa-SA-developer
could you please provide your flutter doctor -v
and your flutter run --verbose.
Also, to better address the issue, would be helpful
if you could post a self contained app on github
or the steps to reproduce it.
Thank you
Please check the comment https://github.com/FirebaseExtended/flutterfire/issues/88#issuecomment-528035835. I'm going to close the issue to avoid duplication, please follow it in https://github.com/FirebaseExtended/flutterfire/issues/88 and upvote.
Hello, I am facing the same issue. could you please help me
Could everyone who still has this problem please file a new issue with the exact descriptions what happens, logs and the output of 'flutter doctor -v' please.
All system setups can be slightly different so it's always better to open new issues and reference related issues.
I'm using firebase_messaging: ^5.1.6
C:\src\flutter\bin\flutter.bat doctor --verbose
[√] Flutter (Channel stable, v1.12.13+hotfix.9, on Microsoft Windows [Version 10.0.18363.778], locale en-US)
• Flutter version 1.12.13+hotfix.9 at C:\src\flutter
• Framework revision f139b11009 (3 weeks ago), 2020-03-30 13:57:30 -0700
• Engine revision af51afceb8
• Dart version 2.7.2
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at C:\Users\user\AppData\Local\Android\Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-R, build-tools 29.0.3
• ANDROID_HOME = C:\Users\user\AppData\Local\Android\Sdk
• Java binary at: C:\Users\user\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\192.6308749\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
• All Android licenses accepted.
[!] Android Studio (version 3.6)
• Android Studio at C:\Users\user\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\192.6308749
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
[√] VS Code (version 1.44.2)
• VS Code at C:\Users\user\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.9.1
[√] Connected device (1 available)
• sdk gphone x86 • emulator-5554 • android-x86 • Android R (API 29) (emulator)
! Doctor found issues in 1 category.
Same issue here:
tk-macbook:minitracker tobias$ flutter doctor -v
[✓] Flutter (Channel stable, v1.17.0, on Mac OS X 10.15.4 19E287, locale de-DE)
• Flutter version 1.17.0 at /Users/tobias/development/flutter
• Framework revision e6b34c2b5c (6 days ago), 2020-05-02 11:39:18 -0700
• Engine revision 540786dd51
• Dart version 2.8.1
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
• Android SDK at /Users/tobias/Library/Android/sdk
• Platform android-29, build-tools 29.0.1
• 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)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.3, Build version 11C29
• CocoaPods version 1.8.4
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 41.1.2
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[✓] VS Code (version 1.44.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.10.1
[✓] Connected device (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
• No issues found!
Inside
<intent-filter>
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
hi @iapicca i have same issue ,
[√] Flutter (Channel stable, v1.17.1, on Microsoft Windows [Version 10.0.17763.1217], locale en-US)
• Flutter version 1.17.1 at C:\src\flutter
• Framework revision f7a6a7906b (12 days ago), 2020-05-12 18:39:00 -0700
• Engine revision 6bc433c6b6
• Dart version 2.8.2
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
• Android SDK at C:\Users\POKER\AppData\Local\Android\sdk
• Platform android-29, build-tools 29.0.1
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
• All Android licenses accepted.
[√] Android Studio (version 3.4)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 37.1.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
[√] IntelliJ IDEA Community Edition (version 2019.1)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.3.2
• Flutter plugin version 39.0.3
• Dart plugin version 191.8593
[√] IntelliJ IDEA Ultimate Edition (version 2018.3)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2018.3.4
• Flutter plugin version 35.3.1
• Dart plugin version 183.6270
[√] VS Code, 64-bit edition (version 1.45.1)
• VS Code at C:\Program Files\Microsoft VS Code
• Flutter extension version 3.10.2
[√] Connected device (2 available)
• LLD L21 • HCYDU18124002724 • android-arm64 • Android 9 (API 28)
• SM N950U • ce07171718956e15027e • android-arm64 • Android 9 (API 28)
• No issues found!
and The Wirring is :
W/FirebaseMessaging(12841): Notification Channel set in AndroidManifest.xml has not been created by the app. Default value will be used.
solution
My English is not perfect, but I solved it by adding a channel natively and then in the manifest where it says channel id I put the id of my channel created natively
My English is not perfect, but I solved it by adding a channel natively and then in the manifest where it says channel id I put the id of my channel created natively
please show how
My English is not perfect, but I solved it by adding a channel natively and then in the manifest where it says channel id I put the id of my channel created natively
please show us how to do it
My English is not perfect, but I solved it by adding a channel natively and then in the manifest where it says channel id I put the id of my channel created natively
How?
Most helpful comment
Hello, I am facing the same issue. could you please help me