Push Advanced - optimove-tech/Optimove-SDK-Cordova GitHub Wiki
To change the push icon, you need to follow this guide.
-
We suggest checking out the Android Asset Studio to generate the icon.
Make sure to comply with the status bar icon guidelines so the icon renders correctly on all devices.
-
Copy drawable resources to
www/res
folder in the project. -
Specify the source and destination folders along with the icon file name in your
config.xml
file.<platform name="android"> <resource-file src="www/res/drawable-hdpi/ic_notification.png" target="app/src/main/res/drawable-hdpi/ic_notification.png" /> <resource-file src="www/res/drawable-mdpi/ic_notification.png" target="app/src/main/res/drawable-mdpi/ic_notification.png" /> <resource-file src="www/res/drawable-xhdpi/ic_notification.png" target="app/src/main/res/drawable-xhdpi/ic_notification.png" /> <resource-file src="www/res/drawable-xxhdpi/ic_notification.png" target="app/src/main/res/drawable-xxhdpi/ic_notification.png" /> <resource-file src="www/res/drawable-xxxhdpi/ic_notification.png" target="app/src/main/res/drawable-xxxhdpi/ic_notification.png" /> </platform>
-
Add the following configuration into your
optimove.json
file with the corresponding icon name.{ "android": { "pushNotificationIconName": "ic_notification" } }
-
Make sure that the name of the drawable resource file matches the name in the configuration.
-
Run
cordova prepare android
to prepare the Android app.