Notification action icon was not showing
I am trying to show a notification on Android and use the code from this link . In some sources, people said that the icon should be completely white, and some source said that I should use .png instead of vector.
I try all of this, but nobody helped me.
I am trying this code:
Notification newMessageNotification =
new Notification.Builder(mContext)
.setSmallIcon(R.drawable.ic_message)
.setContentTitle(getString(R.string.title))
.setContentText(getString(R.string.content))
.addAction(action))
.build();
source to share
With Nougat, they redesigned the notification icons
https://android-developers.googleblog.com/2016/06/notifications-in-android-n.html
You will notice that icons are missing in new notifications; instead, more space is provided for the labels themselves for the limited space of notification shadows. However, notification action icons are still required and continue to be used in older versions of Android and on devices like Android Wear.
source to share
Notification icons must be completely white
If you want to support Lollipop Material Icons then create transparent icons for Lollipop and above . Please refer to https://design.google.com/icons/
source to share