0

I am using RNFirebase notification package ref. https://rnfirebase.io/docs/v4.3.x/messaging/introduction

i have follow all the steps mentioned in the documentation, RNfirebase handle the incomming notification by itself so need to implement extra module rf. https://rnfirebase.io/docs/v4.3.x/notifications/introduction this only help when app is foreground

issue

notification icon on tray

as shown in above image the icon is perfectly visible when notification come form cloud. but when i open the notification tray

notification when tray is open

you can clearly see that icon is gray out (i have searched the issue and removed the alpha channel from the icon ) still the issue is same.

ref 1. https://github.com/zo0r/react-native-push-notification/issues/730 ref 2. Why is my smallIcon for Notifications always greyed out? ref 3.

Jigar
  • 1,314
  • 9
  • 19

1 Answers1

0

You need to supply Android an icon that qualify the Notification icon standard see Material guideline.

  1. The app icon: The app icon is a small two-dimensional representation of your app's identity. It appears in monochrome in the status bar. If your app sends a wide variety of notifications, you may replace your app's identity icon with a symbol that reflects the content type. For example, Google Now uses a cloud icon for weather notifications.

summary - you need an icon with transparent background - inside the icon as well.

In your case you seem to have a white background inside your icon Android system converts all color to a single color by contrast

  • dark or white -

In your icon all converted to gray. you can set your default icon and color in AndroidManifest

<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@mipmap/ic_notification" />
<meta-data android:name="com.google.firebase.messaging.default_notification_color" android:resource="@color/dustyOrange" />
Daniel Givoni
  • 665
  • 6
  • 12