I’m not sure about the config.xml options for the icon. I’ve googled for a solution about this and the information is quite scattered. I’d like to see @mhartington do a post about the various Android notification icons. I’ve seen several questions asked on SO about this for cordova apps but the answers aren’t too well developed. These things the Ionic devs usually explain very well for low/high level users.
@gaurav_ch - isn’t this something that the push service has to offer as part of it’s modeling? I’ve tried setting the title for ionic’s push service, by adjusting the data to match Parse/PushWoosh and it never works. Or is this at the cordova plugin level? Sorry for the ignorance.
Also, a lot of answers on stackoverflow point to modifying the plugin .java code which should work but it’s not clear on where the resource (icon) should be in relation to an ionic/cordova app. I’m assuming the platforms “resources” folder, is that correct?
// try a custom included icon in our bundle named ic_stat_notify(.png)
if (icon == -1) {
icon = getIconValue(context.getPackageName(), "ic_stat_notify");
}
It well displays the good icon on the very top (status bar), but whenever we swipe to show all notifications, it’s the app icon with full color that is taken, not the “ic_stat_notify”.
Any idea?
Update -----------
I managed to do the job.
I added ic_notify.png files for each resolution (same resolution as the app icon) representing large icons (those that appear in the notifications list).
So I have now icons for Android 5.1 without altering any plugins
@Mik378 that’s awesome. I’ll try this later today and see if it works for me as well. Would you mind posting a screenshot of your res folder for Android? I have like 20+ folders, are there that many density differences for Android or can it be reduced?
It just doesn’t load the image when I upload it here …
Basically, I put a ic_notify.png and ic_stat_notify.png for all folders whose patterns are:
drawable-[resolution] (ldpi, mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi)