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...
Asked
Active
Viewed 243 times
1

RAHUL DEEP
- 695
- 3
- 13
- 33
-
Could you please detail what exactly you have already tried? When you say you have added the icons to the project, what specifically are you doing to configuring that? Your modified code would also be helpful in debugging this. Thanks – James Young IBM Feb 15 '16 at 17:23
-
I did all the steps that are given in ibm-bluemix-mobile-services/bms-clientsdk-cordova-plugin-push documentation.URL is https://github.com/ibm-bluemix-mobile-services/bms-clientsdk-cordova-plugin-push .I added icons and splashscreen that is required for an application. – RAHUL DEEP Feb 16 '16 at 04:27
-
i am not getting from where the star icon is coming when i am receiving push notification... – RAHUL DEEP Feb 16 '16 at 04:29
-
The star icon is the default for push notifications. Could you please show us your config.xml code where you are adding your icons for android and ios so we can help debug this. – James Young IBM Feb 16 '16 at 17:20
-
James i am not aware of any attribute to change push notification icon.In my config.xml iam passing icon src for android and ios both.In ios i can get push icon but in android i am getting the default star icon. – RAHUL DEEP Mar 16 '16 at 05:28
1 Answers
3
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/icon-60@3x.png" 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/icon-60@2x.png" width="120" height="120" />
<!-- iPad -->
<icon src="res/ios/icon-76.png" width="76" height="76" />
<icon src="res/ios/icon-76@2x.png" width="152" height="152" />
<!-- iOS 6.1 -->
<!-- Spotlight Icon -->
<icon src="res/ios/icon-40.png" width="40" height="40" />
<icon src="res/ios/icon-40@2x.png" width="80" height="80" />
<!-- iPhone / iPod Touch -->
<icon src="res/ios/icon.png" width="57" height="57" />
<icon src="res/ios/icon@2x.png" width="114" height="114" />
<!-- iPad -->
<icon src="res/ios/icon-72.png" width="72" height="72" />
<icon src="res/ios/icon-72@2x.png" width="144" height="144" />
<!-- iPhone Spotlight and Settings Icon -->
<icon src="res/ios/icon-small.png" width="29" height="29" />
<icon src="res/ios/icon-small@2x.png" width="58" height="58" />
<!-- iPad Spotlight and Settings Icon -->
<icon src="res/ios/icon-50.png" width="50" height="50" />
<icon src="res/ios/icon-50@2x.png" width="100" height="100" />
</platform>
You can find more information here:
https://cordova.apache.org/docs/en/latest/config_ref/images.html
-
-
The configuration instructions above should also allow you to customize your push notification icon. – John Mar 17 '16 at 14:59