Customize Notifications

Prev Next

Configuring Notification Icons

Android supports both small and large notification Icons.

Configuring Small Push Notification Icon

By default, the system uses your launcher icon as the logo in your push notifications. Since Android 4.4, Google guidelines require a white and transparent flat icon. If you do not follow the guidelines, your notification icon may look broken as in the images below.

your title goes here
To quickly generate small icons with the correct settings, we recommend using the Android asset Studio.

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:

<resources>
    <string name="insider_notification_icon">your_icon_name</string>
</resources>
your title goes here

Please note that "your_icon_name" is the name of the icon should be without extension and/or path.

your title goes here

Do not forget to create exceptions for your icons on Dexguard.

Configuring Large Push Notification Icon

The large notification icon will show up to the left of the notification text on Android 4.0.3 - 6.0 devices, and shows on the right for Android 7.0+ devices. If you do not set a large icon, the small icon will be used instead.

You can use a large notification icon by specifying drawable resources within your app. Your icon needs to be in a drawable or mipmap folder. To use it, add its name to your strings.xml file:

<resources>
    <string name="insider_notification_large_icon">your_icon_name</string>
</resources>
your title goes here
Please note that your_icon_name is the name of the icon and should be without extension and/or path.
your title goes here
You should create exceptions for your icons on Proguard.

Configuring Advanced Notification Icon

If you want to control the large icon display in advanced notifications (Carousel and Discovery App Push), add the following line into your values file:

<resources>
    <bool name="insider_advanced_notification_icon_flag">false</bool>
</resources>

If this key is not added, the default value will be true, meaning the large icon will be displayed in advanced notifications.

Configuring Accent Color

If you want your push notification to display in a particular color, first add the following line into your colors.xml file:

<resources>
    <color name="my_push_notification_color">#222222</color>
</resources>

Then add the following line into your strings.xml file:

<resources>
    <string name="insider_notification_circle_color">my_push_notification_color</string>
</resources>
your title goes here
Please note that the color name that you have defined inside the colors.xml (my_push_notification_color) file should be the value of "insider_notification_circle_color" inside the strings.xml file as it is shown in the example code above.

Customizing Notification Sound

If want to use your own custom sound for notifications, you need to add an audio file to your app’s raw folder.

your title goes here

The audio file must be in mp3 format. The filename must be in lowercase and should not contain any special characters or spaces. The recommended sound duration is 30 seconds.

In order to play the custom sound when a push notification is delivered, you need to enter the filename on the Insider Dashboard when you create the notification campaign.

Do not forget that, if you want to create custom notification sound, you have to create at least one android channel and select it within campaign. Otherwise, you cannot trigger the sound on users which are Android Versions 8.0+