By default, we are using your launcher icon as a logo for your notifications. Since Android 4.4, Google guidelines require a 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+).
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:
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".
Example of white and transparent notification icon
From the version Android 5 (Lollipoop) you may:
- change an accent color in a circle behind your icon image
- use a large notification icon
There are two ways to set an accent color:
Statically, in the strings.xml file:
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.
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.