Notification Icon not correct

I am creating a notification which is displaying OK on iOS but it isn't fully correct on Android.
The following code creates the notification, when the app is in the foreground:
int NOTIFICATION_ID = 1000;
var channelId = FirebasePushNotificationManager.DefaultNotificationChannelId;
var msgTitle = e.Data["title"].ToString(); // "title";
var msgContent = e.Data["body"].ToString(); // "message content";
// Build the notification:
var builder = new NotificationCompat.Builder(this, channelId)
.SetAutoCancel(true) // Dismiss the notification from the notification area when the user clicks on it
.SetContentTitle(msgTitle) // Set the title
.SetSmallIcon(Resource.Drawable.k_notification_icon) // This is the icon to display
.SetContentText(msgContent); // the message to display.
builder.SetLargeIcon(Android.Graphics.BitmapFactory.DecodeResource(Resources, Resource.Drawable.k_notification_icon));
// Publish the notification:
var notificationManager = NotificationManagerCompat.From(this);
notificationManager.Notify(NOTIFICATION_ID, builder.Build());
The issues are:
When the notification "popup" appears, the title and content are there but the image is not.
When viewing the notification by pulling down / revealing the notifications, the image is there but the colour is wrong. It is kind of purple rather than red. However, if the app is in the background when the notification arrives, the icon is the correct colour (the icon still doesn't appear in the "popup" message)
I am using the CrossGeeks FirebasePushNotificationPlugin.
But isn't NotificationCompat.Builder from AndroidX.Core.App? I didn't think creating and publishing a notification had anything to do with the Firebase plugin?
Changing to Xamarin.Firebase.Messaging will require other code changes, won't it? E.g.
CrossFirebasePushNotification.Current.OnNotificationReceived += Current_OnNotificationReceived;
Are you saying that the code I have for creating the notification is correct?
Code is correct, but normally the icon will be grey, it will not change from red to purple, that is weird,
NotificationCompat.Builder
comes from androidx.core.app.Could you share this icon that I can make a test?
Sign in to comment