New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unabled to specify the notification icon #62
Comments
@gtribut, in order for the icon to be visible, you have to place fcm_push_icon.png of various sizes into the below folders of the res/ folder You may always use this tool at: Android Asset Studio to generate the fcm_push_icon of various sizes. Hope this helps. |
Thanks, that's it ! |
I have the same problem, when I receive notification the icon is blank. I tried the solution above, but doesn't works. |
Here how I did it :
That's it for the icon files. In your backend code (here php), to send the notifiaction :
|
@gtribut thanks |
@gtribut That was very helpful. The instructions in the README are slightly misleading. It seems to say that you should put fcm_push_icon.png in project/www/res when in fact it should be put in the folders in project/platforms/android/res, for example drawable-hdpi. |
notification appear alert with me .. How can i appear it in notification bar ? |
same problem, impossible to set the fcm_push_icon.png any idea ? |
same here |
@fabienlege @jffs i'm no longer using this plugin, using phonegap-plugin-push |
I've also moved to another service. I work with https://onesignal.com/ who's also free and work very well with iOS and Android on many framework |
I solved it by following this article. |
I am using the FCM plugin and here is what worked for me (September 2019):
It should look something like this now:
Or simply, copy the above line, replace the value of widget id, with your own.
Upload a White version (single color) of your logo on a Transparent background. If you upload a colored version, you will get a dark gray icon, which would look nasty. If you don't have a white version of your logo, get it designed. Leave the rest of the settings as they are. For the Name textbox value, enter: fcm_push_icon. Then click on the Blue colored round shaped button to download the zip file.
Each of those folders will contain a PNG icon by the name "fcm_push_icon.png". The only difference between the icons in those different folders is their size.
Simply copy all the 5 folders listed in in the point 4 above, to the location shown just above i.e. into the res folder i.e. into That's it! Now just build your app. Whenever you receive a notification, you will see your app icon in the notifications (at least on Android). If anyone has figured out how to make colored icons appear in the Android notifications, please share your solution. |
I'm trying to set the little withe notification icon on Android (test on nexus 5 android 6.0.1), in the doc you specify to put a file named 'fcm_push_icon.png' in the res folder.
I did it, even try to put it in 'res/icon' or in 'res/icon/android' but icon of the notification in statusbar stay the app icon not my file 'fcm_push_icon.png'. I even try to set different sizes with names 'fcm_push_icon_ldpi.png' .... 'fcm_push_icon-xhdpi.png'.
Is there something to specify elsewhere ? In config.xml ?
I have tried to had a node but it doesn't work.
In my server call, i have the node
I'm sure i forgot to specify something somewhere (I'm pretty new to phonegap dev...) but I didn't find where :)
Last question, which is the size of this icon file ?
The text was updated successfully, but these errors were encountered: