I am developing a cordova app for Android, iOS and Windows Phone.
I am using the push plugin and the mobile services plugin for cross platform push notifications.
However, This question is related to the push plugin rather than mobile services.
First of all, with iOS, simply including the icon in the res/icons/ios folder and adding "icon": "name" in the init did the job.
For some strange reason with Android, this is not sufficient. In fact, you have to add the icons in the Drawables folders. I located the drawables folders: platforms/android/res, and added the icon I want to show with the push notification in every folder. Then I added the code in the init line, but initially got nothing. The only way it worked was with a transparent icon. However, even with the transparent icon, it does not work as supposed to, as the icon turns all white and has a gray background.
What I want is a white background and the icon with its original colour, or being able to show the icon in its original form.
Another strange point is the fact that the nameoftheicon.png does not work with Android, but works with iOS. In the Android case, nameoftheicon suffices.
Did someone encounter such an issue with the new push plugin? What do you suggest?
This is the code of the init:
pushNotification = PushNotification.init({
"android": { "senderID": GCM_SENDER_ID, "icon": "logo"},
"ios": { "alert": "true", "badge": "false", "sound": "false", "icon": "logo.png" }, "windows": {}
});