Comments (2)
Hello,
I was facing the same issue, and now that it's resolved I don't think this plugin is responsible.
Here's the workaround I've found.
My push notification provider is Batch, and use FirebaseCloudMessaging internally, so I first add a section in the application
part of AndroidManifest.xml
:
<!-- Set custom default icon. This is used when no icon is set for incoming notification messages.
See README(https://goo.gl/l4GJaQ) for more. -->
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_launcher_foreground" />
<!-- Set color used with incoming notification messages. This is used when no color is set for the incoming
notification message. See README(https://goo.gl/6BKBk7) for more. -->
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/ic_launcher_background" />
From : https://firebase.google.com/docs/cloud-messaging/android/client#manifest
(I only add the optional section about icon)
Unfortunately, the icon was visible but icon background color was always black.
I resolve this issue by following Batch documentation, the naming of properties above are slightly different.
Notice: the icon for notification is used as a mask. That implies it must have a transparent background and all colored part will have same color when shown in notification context.
Hope my xp can lead you to a fix 😃 🤞
from flutter_launcher_icons.
@emri99 thanks.
I found a fix as well:
- name your icon "app_icon.png" and place it in the drawable folder
- edit your keep.xml in the raw folder:
tools:keep="@drawable/*,@raw/sound"
(if your soundfile name is sound.mp3) - add the name of the file in the settings:
AndroidInitializationSettings('app_icon');
keep in mind:
notification icon should be white on transparent color. you can create it in Android Studio > right click on resources > New Image Asset > Notification Icon
from flutter_launcher_icons.
Related Issues (20)
- [BUG] exploit in dependency
- The icon of an application can be dynamically changed within an application
- [BUG] MacOS logo does not change HOT 3
- [FEATURE REQUEST] Transparent Background for Android Icons HOT 1
- [BUG] Can't refresh icon HOT 2
- [FEATURE REQUEST] Generate `favicon.ico` for web HOT 1
- [BUG] FormatException: Missing argument for "file".
- [BUG] Execution fails when renaming the default Runner project
- [BUG] Could not find a file named "pubspec.yaml"
- [BUG] ✗ ERROR: NoConfigFoundException No configuration found in flutter_launcher_icons.yaml or in pubspec.yaml. In case file exists in different directory use --file option #0 createIconsFromArguments (package:flutter_launcher_icons/main.dart:75:7) #1 main (file:///C:/Users/ahmed/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_launcher_icons-0.10.0/bin/main.dart:7:26) #2 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:294:33) #3 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189:12)
- [BUG] Unhandled Exception: PlatformException(INVALID_ICON, The resource app_icon could not be found. Please make sure it has been added as a drawable resource to your Android head project., null, null) HOT 1
- [BUG] Could not find a file named "pubspec.yaml" HOT 2
- Dart 2.18.2 is incompatible
- [BUG] Not all futures are awaited so impossible to create a dart custom dart script HOT 1
- [BUG] printStatus not using configured logger HOT 1
- [BUG] Backround color not changing HOT 2
- [BUG] Black screen on Samsung cellphone instead of white screen with icon in the middle? HOT 1
- [BUG] Adaptive Monochrome Icons are not generated HOT 1
- [BUG] icon resolution decreased
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_launcher_icons.