The notification icon for Android Lollipop devices is not displaying correctly

Android Lollipop changed the way that notification icons are required to be configured.  Lollipop icons are now required to be a white colored icon with an alpha value.

 

You can define the icons and the color directly on the default notification factory:

 

These methods pass the values directly to the corresponding notification builder setters. See NotificationCompat.Builder | Android Developers for more information.

 

In the end, you should have something similar to the following:

// Create Notification Factory
DefaultNotificationFactory defaultNotificationFactory = new DefaultNotificationFactory(getApplicationContext());
// Get the Icon image from resources
defaultNotificationFactory.setSmallIconId(R.drawable.ic_notification);
// Set the accent color
defaultNotificationFactory.setColor(NotificationCompat.COLOR_DEFAULT);
airship.getPushManager().setNotificationFactory(defaultNotificationFactory);

 

 

Related Content: