小编Lui*_*aru的帖子

flutter firebase 推送通知图标

我制作了一个应用程序,并实现了推送通知,它可以工作,但我尝试使用 a 更改默认图标image.png,但它没有按我预期的方式工作。这是我的通知的样子:在此输入图像描述

我希望我的图标看起来像这样:

在此输入图像描述

我在我的 Android 清单中添加了以下内容:

<!-- Add custom icon to the notifications -->
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_notifications" />
<!-- Change the color of the icon -->
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/colorPrimary" />
Run Code Online (Sandbox Code Playgroud)

我不知道我做错了什么,但你能帮助我吗?

icons android push-notification flutter flutter-notification

3
推荐指数
1
解决办法
7168
查看次数