Useful or not, from you.
react-native-firebase Notification icon is not showing in android 8.0 and and above

Hi, I am using 'react-native-firebase' for FCM. Android version below 8.0 the push notification icon is working fine, but android version 8.0 and above the empty push notification icon is displaying. Can u guys please help me to fix this issue.

screenshot_2018-12-27-19-16-25-337_com krossark krossdelivery

 firebase.messaging().onMessage((message) => {
        // Process your message as required


        if (Platform.OS === Constants.ANDROID) {
            const localNotification = new firebase.notifications.Notification()
                .setNotificationId(message.messageId)
                .setTitle(JSON.parse(message.data.custom_notification).title)
                .setBody(JSON.parse(message.data.custom_notification).body)
                .android.setChannelId('fetchh-channel') // e.g. the id you chose above
                .android.setSmallIcon('R.mipmap.ic_launcher') // create this icon in Android Studio
                .android.setPriority(firebase.notifications.Android.Priority.High);

            firebase.notifications()
                .displayNotification(localNotification)
                .catch(err => console.error(err));

            if (JSON.parse(message.data.custom_notification).title === Constants.SECURITY_ALERT) {
                this.props.navigation.navigate('SignOut');
            }
        }
    });
That's a useful answer
Without any help

A combination of these answers fixed the problem for me: https://stackoverflow.com/a/45318726/9957187 https://stackoverflow.com/a/40232181/9957187

I have to create transparent icons (basically a white silhouette of the logo on the normal icon, with a transparent background). I called those icons ic_stat_ic_notification.png and placed them in the mipmap folders.

Then I added these lines to AndroidManifest.xml: The first is to set the default notification icon The second is to set the background color of the circle surrounding the icon

<meta-data
  android:name="com.google.firebase.messaging.default_notification_icon"
  android:resource="@mipmap/ic_stat_ic_notification" />
<meta-data
  android:name="com.google.firebase.messaging.default_notification_color"
  android:resource="@color/petrol" />