setNotificationIconBackgroundColor

Sets the background color for the notification icon.

On Android 5.0 (Lollipop) and above, notification icons are displayed as white silhouettes on a colored circle background. This method sets that background color.

This is commonly used to match your app's brand colors. Example:


	  // Set brand color for notification icons
	  public class MyApplication extends Application {
	      
	      public void onCreate() {
	          super.onCreate();
	
	          int brandColor = ContextCompat.getColor(this, R.color.brand_primary);
	          PushwooshNotificationSettings.setNotificationIconBackgroundColor(brandColor);
	      }
	  }
	
	  // Blue background for social app
	  PushwooshNotificationSettings.setNotificationIconBackgroundColor(Color.parseColor("#1DA1F2"));
	
	  // Green background for messaging app
	  PushwooshNotificationSettings.setNotificationIconBackgroundColor(Color.parseColor("#25D366"));
	

Parameters

color

background color as an integer (use android.graphics.Color or color resource)

See also

<a href="https://developer.android.com/reference/android/app/Notification.Builder.html#setSmallIcon(int)">Notification.Builder.setSmallIcon</a>