I am trying to set notification icon which I generated using Android Image Asset. Generated image has just white color and some transparent part.
I pasted here piece of code here. Which doesn't reflect same color what I set in my code. See my code. and please provide solution if possible.
My piece of code looks like this:
Notification inboxStyleNotification = new NotificationCompat.Builder(MyFcmListenerService.this)
.setContentTitle(title)
.setContentText(text)
.setSmallIcon(R.drawable.noti_status_icon)
.setLargeIcon(anImage)
.setPriority(Notification.PRIORITY_HIGH)
.setContentIntent(pIntent)
.setChannelId(transactions_chnl_id)
.setCategory(Notification.CATEGORY_MESSAGE)
.setColor(getResources().getColor(R.color.yellow_light))
.setSound(Settings.System.DEFAULT_NOTIFICATION_URI)
.setStyle(inboxStyle)
.setAutoCancel(true)
.build();
yellow_light code is: #FFC107
But when it reflects with R.drawable.noti_status_icon it doesn't reflect with exact yellow_light color.
How to do this?
first, remove this code part
then generate a notification icon like this, select an image, set the yellow color there, click next, and finish. it will generate an icon with a yellow color and icon name to noti_status_icon.
then use the below code