I create simple notification:
Notification.Builder builder = new Notification.Builder(this);
builder
.setContentTitle("title")
.setContentText("this is small text")
.setSmallIcon(R.drawable.my_small_icon)
.setTicker("test Ticker")
.setStyle(new Notification.BigTextStyle().bigText("big mess"));
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {
NotificationManager notificationManager = getSystemService(NotificationManager.class);
Bitmap image = BitmapFactory.decodeResource(this.getResources(), R.drawable.icon);
builder.setLargeIcon(image);
RemoteViews contentView = builder.createContentView();
RemoteViews bigContentView = builder.createBigContentView();
// custom contentView and bigContentView
builder.setCustomContentView(contentView);
builder.setCustomBigContentView(bigContentView);
Notification n = builder.build();
builder.build();
notificationManager.notify(1, n);
}
my_small_icon
is an image white color in transparent, my problem is different this question
It shows my small icon in the status bar same my logo, but it shows a gray square
This problem happening in Redmi 4A 7.1 LG K530F and Galaxy J7 display normally.
Can you give me the advice to fix it?
I use Android Asset Studio but it can't help.