My app is for API 26 or higher.
I am having an issue with the small icon in the notification. I went to the documentation here, and regardless of my issue, I saw that it is mentioned the icon has to be white, but as I am working right now I am listening to podcasts using the google podcast app and the icon is colorful. So does it have to be white or not? Or is it only google apps that can have colors?
link to the documentation: https://developer.android.com/guide/practices/ui_guidelines/icon_design_status_bar.html
My issue is that while my icon appears on top when the drawer is closed (it is the green icon by the colorful google podcast icon). But when the drawe is open, the icon doesn't show and it's just a blank greenish circle.
This is how I build the the notification:
Uri notificationSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(something, ADMIN_CHANNEL_ID)
.setSmallIcon(R.drawable.logo_fallback)
.setLargeIcon(resource)
.setContentTitle(remoteMessage.getData().get("title"))
.setContentText(remoteMessage.getData().get("message"))
.setAutoCancel(true)
.setSound(notificationSoundUri)
.setContentIntent(pendingIntent);
//Set notification color to match your app color template
notificationBuilder.setColor(getResources().getColor(R.color.colorPrimaryDark));
notificationManager.notify(notificationID, notificationBuilder.build());
and the resource I am using is a PNG. I've tried an XML too with no success.