1

I have created white/transparent PNG notification icons and added them in application meta-data in AndroidManifest as per the manuals.

The strange thing is that the custom icon is displayed correctly on Samsung Mini (jelly bean) and Nexus 4 (API 27) emulator, but not on Samsung A6 (Oreo) and Huawei Honor Lite 9 (Oreo) devices where I see the default white droid on green background icon.

The notification is always displayed but on some devices the custom icon is not used.

I tried to implement it in AssetStudio and also implemented with and without Notification Builder but it had not effect.

Angelina
  • 1,473
  • 2
  • 16
  • 34

4 Answers4

0

For Oreo you need to implement notification channels: https://developer.android.com/training/notify-user/channels

Also you should put default default_notification_channel_id inside the AndroidManifest: https://firebase.google.com/docs/cloud-messaging/android/receive

Valery
  • 1
  • 2
    while this answer can give help it's always better to put the relevant code in the post and give the link only as reference – DaFois Jul 23 '18 at 13:41
0

The issue was solved by using the latest versions of Google Play and Firebase libraries. I had a slightly outdated Google Play version.

Angelina
  • 1,473
  • 2
  • 16
  • 34
0

set this to your application tag in Manifest:

        <meta-data
        android:name="com.google.firebase.messaging.default_notification_icon"
        android:resource="@drawable/ic_your_default_logo" />
Ronny Bigler
  • 654
  • 6
  • 12
-1

Create a transparent icon. To test download any png , colorAccent is #ff7800 for my example

  • Add these lines in manifest.file

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

These changes will help in icon display.

Agilanbu
  • 2,747
  • 2
  • 28
  • 33