I'm presenting different notifications in different scenarios in my application. Those notifications are created using the following code:
protected void updateNotificationProgress() {
notification.setContentTitle(notificationConfig.getTitle())
.setContentText(String.format(getString(R.string.in_progress_formatted_string), (Utils.getUploadedFilesCount(this) + 1), Utils.getTotalUploadCount(this)))
.setContentIntent(notificationConfig.getPendingIntent(this))
.setSmallIcon(notificationConfig.getIconResourceID())
.setProgress(Utils.getTotalUploadCount(this), Utils.getUploadedFilesCount(this), false)
.setOngoing(true);
startForeground(UPLOAD_NOTIFICATION_ID, notification.build());
}
While on most devices (LG G3, Samsung Galaxy devices) this notification looks as follows:
On Nexus devices this icon looks like this:
Why does this happen, and what is the proper way to fix this?
Starting in I believe Lollipop the OS changes your icon to white scale automatically to keep notification icons consistent.
So basically what I am saying is if both devices are on lollipop your LG device is not following the rules google set with the notifications and changed them to not do that.
Edit
The reason you see that one app's notification icon in color is because their target SDK (17) is still below lollipop (21) so the rules do not apply to those notification icons