On MIUI devices, there is an option to choose the notification style between Android and MIUI. When I select android style, my icon is displayed as a gray square, and when MIUI style is displayed, the icon is displayed correctly. I noticed that the Gmail icon changes its display depending on the selected style.
Android Style:
MIUI STYLE:
When I chose the android style, my icon looks like this:
When I chose MIUI style, my icon is displayed correctly with all colors.
At the moment, I'm setting the icon like this:
val icon = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
R.mipmap.ic_launcher else R.drawable.ic_app_icon
notificationBuilder.setSmallIcon(icon)
How do I set an icon to achieve the same result as gmail? Maybe I need to make some special icon?


