I'm trying to change notification icons and in emulator it is OK :
This is what I want (tested on emulator API level 22 (android 5.1.1)) BUT, when i'm running this APP in my real phone (Xiaomi Redmi 3 prime with MIUI 8.0.1) also android 5.1.1 - the notifications looks very very very differant. This notification icons does not showing (just a default application icon).
But... why? What can i do now?
Here is my code:
NotificationCompat.Builder b = new NotificationCompat.Builder(compat);
b.setSmallIcon((state == STATE_STOPPED) ? R.drawable.ic_stat_remove : R.drawable.check);
b.setColor((state == STATE_STOPPED) ? Color.RED : Color.rgb(22, 219, 28));
NotificationManager m = (NotificationManager) compat.getSystemService(NOTIFICATION_SERVICE);
This is behavior of MIUI system. You can not display different icons in notification, by default it takes app icon as notification icon.