Our documentation is changing, please click here to enjoy it!

Skip to end of metadata
Go to start of metadata

By default, we are using your launcher icon as a logo for your notifications. Since Android 4.4, Google guidelines require   white and transparent flat icon . If you don't follow the guide lines your notification icon may look like on the images below (Android 4.4+ and Android 7+).

Android <4.4

Android 4.4+

Android 7+

 

Android 4.4+

To fix this you need to add a notification icon compliant with Google guidelines in your drawable resources and specify it in your strings.xml file:

strings.xml

Please note that "your_icon_name" is the name of the icon without extension and/or path. For instance, if you want to use drawable/ic_action_search.png, please replace "your_icon_name" by "ic_action_search".

Try notification icon generator to create your Material Design Notification icons.

Example of white and transparent notification icon

 

Android 4.4+

 

Android 5+

From the version Android 5 (Lollipoop) you may:

  • change an accent color in a circle behind your icon image
  • use a large notification icon

Accent Color

There are two ways to set an accent color:

 

Android 5+

Android 7+

  1. Statically, in the strings.xml file:

    strings.xml
  2. Dynamically, via Accengage dashboard in custom parameters of push notification 

Your accent color can be set in ARGB/RGB format, or in a color name format, for instance bleu.

Large Notification Icon

If you want to use a large notification icon as shown on the images below, you need:

  • either add a thumbnail via Accengage dashboard

  • or set programmatically by overriding getLargeIcon or getLargeIconUrl methods of NotificationClientCreator class. 
Android versions lower than Android 5 can also support large notification icons by using com.android.support:appcompat-v7.

Android <5

 

Android 5+

 

Android 7+

 

Note that the small icon is added automatically and the image source is:

  • either your launcher icon
  • or the icon specified in the strings.xml file in the acc_notification_icon parameter.
  • No labels