How to customize Bluemix push notification?

253 views Asked by At

I am using bluemix ibm-mfp-push and ibm-mfp-core for push notification for my hybrid mobile application. I have added all the icons and splashscreen in the project but still whenever i am sending notification,it's showing a start icon.I want to change this star icon with my app icon.Also i need to redirect my user to some proper screen on click of push notification. Any reference or examples will be appreciated...

1

There are 1 answers

2
John On

You can customize your apps icons in the Cordova config.xml file using the <icon> tag. Different devices will used different sized icons for push notifications, so you will need to ensure that you provide icons sized for each of the device types you'd like to support.

Here is an example of the icon configuration for Android and iOS:

<platform name="android">
    <!-- 
        ldpi    : 36x36 px
        mdpi    : 48x48 px
        hdpi    : 72x72 px
        xhdpi   : 96x96 px
        xxhdpi  : 144x144 px
        xxxhdpi : 192x192 px
    -->
    <icon src="res/android/ldpi.png" density="ldpi" />
    <icon src="res/android/mdpi.png" density="mdpi" />
    <icon src="res/android/hdpi.png" density="hdpi" />
    <icon src="res/android/xhdpi.png" density="xhdpi" />
    <icon src="res/android/xxhdpi.png" density="xxhdpi" />
    <icon src="res/android/xxxhdpi.png" density="xxxhdpi" />
</platform>

<platform name="ios">
    <!-- iOS 8.0+ -->
    <!-- iPhone 6 Plus  -->
    <icon src="res/ios/[email protected]" width="180" height="180" />
    <!-- iOS 7.0+ -->
    <!-- iPhone / iPod Touch  -->
    <icon src="res/ios/icon-60.png" width="60" height="60" />
    <icon src="res/ios/[email protected]" width="120" height="120" />
    <!-- iPad -->
    <icon src="res/ios/icon-76.png" width="76" height="76" />
    <icon src="res/ios/[email protected]" width="152" height="152" />
    <!-- iOS 6.1 -->
    <!-- Spotlight Icon -->
    <icon src="res/ios/icon-40.png" width="40" height="40" />
    <icon src="res/ios/[email protected]" width="80" height="80" />
    <!-- iPhone / iPod Touch -->
    <icon src="res/ios/icon.png" width="57" height="57" />
    <icon src="res/ios/[email protected]" width="114" height="114" />
    <!-- iPad -->
    <icon src="res/ios/icon-72.png" width="72" height="72" />
    <icon src="res/ios/[email protected]" width="144" height="144" />
    <!-- iPhone Spotlight and Settings Icon -->
    <icon src="res/ios/icon-small.png" width="29" height="29" />
    <icon src="res/ios/[email protected]" width="58" height="58" />
    <!-- iPad Spotlight and Settings Icon -->
    <icon src="res/ios/icon-50.png" width="50" height="50" />
    <icon src="res/ios/[email protected]" width="100" height="100" />
</platform>

You can find more information here:

https://cordova.apache.org/docs/en/latest/config_ref/images.html