Can you guide how can I set push notification icon. And where to put icon image and how to use icon with path in ionic code
Which push notification service are you using?
Using ionic native phone gap plugin for push notification
I second this thread. Are we still in a situation that Ionic can’t automatically generate android push notification icon? Are we seriously supposed to first manually generate push notification icon and then copy them manually into android platform (every time we regenerate) or create a copy script to do this in build? I’m in disbelief since almost every App now days has push notifications of some sort.
And in case anyone was wondering, I’m using firebase to send notifications (general and end to end).
I use Onesignal to handle my push notification and all i do is to open my config.xml file and add this code to it
<resource-file src="resources/android/icon/drawable-mdpi-icon.png" target="res/drawable-mdpi/ic_stat_onesignal_default.png" /> <resource-file src="resources/android/icon/drawable-hdpi-icon.png" target="res/drawable-hdpi/ic_stat_onesignal_default.png" /> <resource-file src="resources/android/icon/drawable-xhdpi-icon.png" target="res/drawable-xhdpi/ic_stat_onesignal_default.png" /> <resource-file src="resources/android/icon/drawable-xxhdpi-icon.png" target="res/drawable-xxhdpi/ic_stat_onesignal_default.png" /> <resource-file src="resources/android/icon/drawable-xxxhdpi-icon.png" target="res/drawable-xxxhdpi/ic_stat_onesignal_default.png" />
Then run the build process
Thank you! I have read dozens threads from google and none of them had this simple of an answer. I will give this a try.
Noup I give up. Can’t be done. Still a *sensored* grey circle on android.
Test with another device and check
I use Onesignal and it works perfectly