我正在尝试这段代码,
NotificationCompat.Builder nfBuilder = new NotificationCompat.Builder(
context)
..setContentTitle(
"XYZ")
.setContentText("ABC")
.setContentIntent(pIntent)
.setDefaults(Notification.DEFAULT_ALL)
.setOnlyAlertOnce(true)
.setAutoCancel(true)
.setPriority(Notification.PRIORITY_HIGH)
.setSmallIcon(R.drawable.woj_ic_launcher);
Notification notification = nfBuilder.build();
NotificationManager nfManager = (NotificationManager) context
.getSystemService(Context.NOTIFICATION_SERVICE);
nfManager.notify(requestCode, notification);
问题是,在所有其他平台上都可以正常工作,但在棒棒糖上,它显示非常小的图标,并带有灰色圆圈。我尝试更改图标大小并使用setLargeIcon()方法,但仍然没有成功。