Hello to all,
After publish my previous post I find something in the code that can confuse you, Paolo. I will try to explain it here. As you can see, in the Android payload of the push notification, we use a couple of keys "icon" and "image". Well, the "image" key is the path of an app's file, and, appear in the push notification (but I can't tell you exactly in what place).
But the "icon" key is different... we see in the code that we use the "pushicon" string. So where is this "pushicon"? Ok. This push icon is also an app's image file, but, must be established using the app's Cordova Extra XML option, exactly like you see below:
Above you can see two things: the first one is something that may you no need, but, that can be useful: it's an instructions to Apache Cordova to copy our app's "google-services.json" (used for push notifications) in the right app's path, so we no need to do manually.
The below instructions is what is related with the icon. What we do is to copy an image file which is added by the app into the right folder to be used when the app is compiled with Apache Cordova. This all is documented in the push notification plugin here.
So for the "icon" key of the payload for Android we are indicating the name of an image file: and this image file is an image file that we add in the app using the app's files manager. Then we use the Cordova Extra XML configuration option to copy this file into the right place, following the push plugin documentation. For that reason the "icon" file is not a path (like I suggest in my previous post), but the name (without extension) of a PNG file, which must be found in the "res/drawable" directory of the app.
I hope you can get it working, Paolo, however, remember that you can post here or in a new thread if you have any further questions.