Closed michelsondan closed 5 years ago
Someone? at least can someone write from where the default icon location (Cordova icon) so I can try to overwrite it...
+1 Would be good to get something in the docs on this. Currently looking into how to fix it, will post here if I find a solution.
@jackvial hello any update for this?
+1
BTW this used to work with the icons pngs in the drawable folders as descrived above when on my Node.js server I used fcm-node package and put the 'icon' property in my notification object.
However now that I switched to admin.messaging() , (because fcm-node is outdated and no longer supports desktop push), this is no longer working. Help is much needed here, thanks!
Any news?
@marcelledi add this <meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/notification_icon" />
inside application tag works for me
Any update on this issue?
@kpshinde Try to do what @almasmaris said. It worked for me.
closing as resolved per @almasmaris's comment
My problem is continuing.
My plugin version: 1.0.5 (I use this version for issue #899 problem) Cordova android version: 6.4.0
Config.xml
<resource-file src="resources/android/icon/drawable-xxxhdpi-icon.png" target="res/drawable/notification_icon.png" />
<resource-file src="resources/android/notification/drawable-hdpi/notification_icon.png" target="res/drawable-hdpi/notification_icon.png" />
<resource-file src="resources/android/notification/drawable-ldpi/notification_icon.png" target="res/drawable-ldpi/notification_icon.png" />
<resource-file src="resources/android/notification/drawable-mdpi/notification_icon.png" target="res/drawable-mdpi/notification_icon.png" />
<resource-file src="resources/android/notification/drawable-xhdpi/notification_icon.png" target="res/drawable-xhdpi/notification_icon.png" />
<resource-file src="resources/android/notification/drawable-xxhdpi/notification_icon.png" target="res/drawable-xxhdpi/notification_icon.png" />
<resource-file src="resources/android/notification/drawable-xxxhdpi/notification_icon.png" target="res/drawable-xxxhdpi/notification_icon.png" />
<resource-file src="resources/android/notification/mipmap-hdpi/notification_icon.png" target="res/mipmap-hdpi/notification_icon.png" />
<resource-file src="resources/android/notification/mipmap-ldpi/notification_icon.png" target="res/mipmap-ldpi/notification_icon.png" />
<resource-file src="resources/android/notification/mipmap-mdpi/notification_icon.png" target="res/mipmap-mdpi/notification_icon.png" />
<resource-file src="resources/android/notification/mipmap-xhdpi/notification_icon.png" target="res/mipmap-xhdpi/notification_icon.png" />
<resource-file src="resources/android/notification/mipmap-xxhdpi/notification_icon.png" target="res/mipmap-xxhdpi/notification_icon.png" />
<resource-file src="resources/android/notification/mipmap-xxxhdpi/notification_icon.png" target="res/mipmap-xxxhdpi/notification_icon.png" />
<resource-file src="resources/android/notification/drawable-hdpi/notification_icon.png" target="app/src/main/res/drawable-hdpi/notification_icon.png" />
<resource-file src="resources/android/notification/drawable-ldpi/notification_icon.png" target="app/src/main/res/drawable-ldpi/notification_icon.png" />
<resource-file src="resources/android/notification/drawable-mdpi/notification_icon.png" target="app/src/main/res/drawable-mdpi/notification_icon.png" />
<resource-file src="resources/android/notification/drawable-xhdpi/notification_icon.png" target="app/src/main/res/drawable-xhdpi/notification_icon.png" />
<resource-file src="resources/android/notification/drawable-xxhdpi/notification_icon.png" target="app/src/main/res/drawable-xxhdpi/notification_icon.png" />
<resource-file src="resources/android/notification/drawable-xxxhdpi/notification_icon.png" target="app/src/main/res/drawable-xxxhdpi/notification_icon.png" />
<config-file parent="./application" target="AndroidManifest.xml">
<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/notification_icon" />
</config-file>
Folder
Payload
{"tap":true,"body":"testPanel","date":"1538738092","icon":"notification_icon","pnid":"2441","alert":"testPanel","notId":"29134","title":"TEST","deeplink":"{\"parameters\":{\"contentType\":\"announcement\",\"referenceId\":95},\"pageName\":\"content-detail\"}"}]
Statusbar
Problem
Try to build apk, in apk working with original icon. I think problem in in emulator
The Notification Icon that is showing is of Cordova, not my icon. I use cordova-firebase-plugin 0.1.25 with Quasar.
1. I have put all icons in src-cordova\platforms\android\app\src\main\res\drawable-X (I named the icon's to "notification_icon.png")
2. Change in src-cordova\platforms\android\app\src\main\AndroidManifest.xml -
3. I even try to change in server side - notification = new { body = myBody, title = myTitle, sound = "Enabled", icon = "notification_icon" }
Not working.
Notice - In version 0.1.24 it worked perfect !
Please help Thanks