如何在#flutter中更改用于推送通知的Android通知图标/状态栏图标? [英] How to Change the Android Notification Icon/Status Bar Icon for Push-notification in #flutter?
本文介绍了如何在#flutter中更改用于推送通知的Android通知图标/状态栏图标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想用自己的用于推送通知的图标替换默认的图标.
I want to replace the default Icon with my own icon for Push-notifications.
现在,应用程序将图标显示为白色框.
Now the App show the Icon as White box .
推荐答案
只需在清单文件中添加一个meta数据标签即可.
Just add a meta-data inside tag in your manifest file.
<!-- Set custom default icon. This is used when no icon is set for incoming notification messages. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="When Coin"
android:icon="@mipmap/ic_launcher">
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@mipmap/ic_stat_ic_notification" />
这篇关于如何在#flutter中更改用于推送通知的Android通知图标/状态栏图标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文