Hello 👋 How can we help?

Change push notifications' icons and texts

Make your push notifications as beautiful as a rose.
Written by Alex
Updated 2 weeks ago

You can customize the look of push notifications sent by the HelpCrunch Android SDK by changing the notification icon and text.

1. Add your app icon to “drawable”.
2. Add your notification channel title.
3. Add the large icon color.
4. Set up the SDK, indicating which resource to use:

//App.java (extends Application)

//Customize notification avatar
HCAvatarTheme avatarTheme = new HCAvatarTheme.Builder()
                .setPlaceholderBackgroundColor(R.color.hc_color_code_bg_outcoming_dark)
                .setPlaceholderTextColor(android.R.color.white)
                .build();

//Customize notification theme
HCNotificationsTheme notificationsTheme = new HCNotificationsTheme.Builder()
                .setAvatarTheme(avatarTheme)
                .setChannelTitleRes(R.string.app_name)
                .setChannelTitle("Lorem Support") //or use String value
                .setSmallIconRes(R.drawable.ic_favicon)
                .setMessagesCounterEnabled(false)
                .setColor(Color.parseColor("#4c82f8"))
                .build();

//Get Default theme template to change only notification's theme
HCTheme theme = new HCTheme.Builder(HCTheme.DEFAULT)
                .setNotificationsTheme(notificationsTheme)
                .build();

HCOptions options = new HCOptions.Builder()
                .setTheme(theme)
                .build();

HelpCrunch.initialize(
                this,
                ORGANISATION,
                APP_ID,
                SECRET,
                null,
                options
);

Customize the color, icons, text and style of notifications:

...or like this:

Did this answer your question?