【发布时间】:2018-08-13 07:47:34
【问题描述】:
在我的应用中,Firebase 推送通知未正确显示图标,它在通知中显示全灰色图标。 我用于实现通知的代码
var notificationBuilder = new Notification.Builder(this)
.SetSmallIcon(Resource.Drawable.ic_launcherLmg)
.SetContentTitle(user.Organization)
.SetSubText(user.ModuleName)
.SetContentText(user.BodyText)
.SetAutoCancel(true)
.SetContentIntent(pendingIntent)
.Build();
图标我设置在SetSmallIcon(Resource.Drawable.ic_launcherLmg) 行。
ic_launcherLmg 图标在给定尺寸的以下文件夹中可用
- drawable-idpi--36x36
- drawable-mdpi--48x48
- drawable-hdpi--72x72
- drawable-xhdpi--96x96
以最高 8.1 API 为目标的应用。 Minimun 5.0 API。
推送通知截图
【问题讨论】:
标签: c# android firebase xamarin xamarin.android