FirebasePushNotificationPlugin icon indicating copy to clipboard operation
FirebasePushNotificationPlugin copied to clipboard

android icon always defaulting to app icon

Open bluejeff31 opened this issue 5 years ago • 2 comments

🐛 Bug Report

setting the small icon on android is not working, it is always defaulting to the app icon.

Expected behavior

Set the app icon using: FirebasePushNotificationManager.IconResource = Resource.Drawable.notification_icon; The push notifications default handler should use this icon

Reproduction steps

add icon resource with proper name into drawable

set icon using: FirebasePushNotificationManager.IconResource = Resource.Drawable.notification_icon;

Configuration

xamarin forms v4.6

Version: 3.3.10

Platform:

  • [x] :robot: Android

bluejeff31 avatar Jun 06 '20 00:06 bluejeff31

The CrossGeeks implementation for the icon only works for me when the app is in Foreground. If you want to use the icon in the background you must edit the AndroidManifest:

Insert the following meta-data element into the application section:

<meta-data
    android:name="com.google.firebase.messaging.default_notification_icon"
    android:resource="@drawable/notification_icon" />

Check it: https://docs.microsoft.com/es-es/xamarin/android/data-cloud/google-messaging/remote-notifications-with-fcm?tabs=windows#implement-client-app-code

joseavilees avatar Sep 04 '20 07:09 joseavilees

Hi ! I've successfully customize the notification Icons (App & Notifications), but when I receive a notification on the android smartphone, the icon is not customized on the wearable attached (android wear watch). I did worked when I compiled against Android9, but it's now broken when compiling with AndroidX.

To summup, with Android10, the notification shown on the smartphone has a correct customized icon, but the watch android-wear notification got the "default-droid-icon".

Any ideas why ? (I repeat, it worked well before with android9)

Thanks

Jerome-Liger avatar Oct 16 '20 12:10 Jerome-Liger