Я пробовал изменить размер PNG значка (размеры 720x720, 66x66, 44x44, 22x22). Любопытно, что при использовании меньших размеров белый квадрат становится меньше.
Я погуглил эту проблему, а также правильный способ генерации уведомлений, и, судя по тому, что я прочитал, мой код должен быть правильный. К сожалению, дела обстоят не так, как должно быть.
У меня телефон Nexus 5 с Android 5.1.1. Проблема также присутствует в эмуляторах: Samsung Galaxy s4 с Android 5.0.1 и Motorola Moto G с Android 5.0.1 (оба я позаимствовал, но сейчас у меня их нет)
Далее приведен код уведомлений и два снимка экрана. Если вам нужна дополнительная информация, пожалуйста, спрашивайте ее.
Спасибо всем.
Код: Выделить всё
@SuppressLint("NewApi") private void sendNotification(String msg, String title, String link, Bundle bundle) {
NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
Intent resultIntent = new Intent(getApplicationContext(), MainActivity.class);
resultIntent.putExtras(bundle);
PendingIntent contentIntent = PendingIntent.getActivity(this, 0,
resultIntent, Intent.FLAG_ACTIVITY_NEW_TASK);
Notification notification;
Uri sound = Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.notificationsound);
notification = new Notification.Builder(this)
.setSmallIcon(R.drawable.lg_logo)
.setContentTitle(title)
.setStyle(new Notification.BigTextStyle().bigText(msg))
.setAutoCancel(true)
.setContentText(msg)
.setContentIntent(contentIntent)
.setSound(sound)
.build();
notificationManager.notify(0, notification);
}


Подробнее здесь: https://stackoverflow.com/questions/307 ... -square-sh