The problem seems to happen when a send a remote notification from firebase to my application.
When my app is in foreground, the notification icon is the correct one ("没") but when it is in background or when my app is closed, the notification icon is the default one ("the Robot").
I have some screenshot to demonstrate:
The first one is the notification when my app was running in foreground with the correct icon:

The second is the same but when my app was running in background and with the default icon:

The third is just to show that I've sent the exactly same notification but the icon are not the same:

My source code:
.
.
.
const channel = new firebase.notifications.Android.Channel('channelId', 'new-sales', firebase.notifications.Android.Importance.High)
.setDescription('new sales avaiable')
.enableVibration(true)
.setLockScreenVisibility(firebase.notifications.Android.Visibility.Public)
// Create the channel
firebase.notifications().android.createChannel(channel);
var realNotification = new firebase.notifications.Notification()
firebase.messaging().hasPermission().then(enabled => {
if (enabled) {
this.notificationDisplayedListener = firebase.notifications().onNotificationDisplayed((notification : Notification) => {
.
.
.
});
this.notificationListener = firebase.notifications().onNotification((notification : Notification) => {
realNotification = new firebase.notifications.Notification()
.setNotificationId("033")
.setTitle(notification.title)
.setBody(notification.body)
.android.setChannelId('channelId')
.android.setSmallIcon('icon')
firebase.notifications().displayNotification(realNotification)
});
}
.
.
.
P.S. Sorry for my bad english, this is my first post here.
Application Target Platform:
Android
Development Operating System:
macOS High Sierra
Build Tools:
Android studio
React Native version:
0.54.2
RNFirebase Version:
4.0.3
Firebase Module:
Notifications
Hey, I've just figured out that if i change my
<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/icon" // I changed this line.
android:theme="@style/AppTheme">
.
.
.
.
.
.
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@mipmap/icon"
/>
@rogBordignon yes, I think you should be able to put 2 separate icons
@rogBordignon as you mentioned yes, you can customise this using meta content in your android manifest, see the docs here: https://rnfirebase.io/docs/v4.0.x/notifications/android#Default-icon-and-color-(Optional) and this can be any icon in your android resources, it doesn't have to be your app icon, we just use that as an example.
Hi guys, here is my meta-data that I added to the Android Manifest file
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/background_splash" />
However I could not get the desired result on getting the notification on the app. What could be the possible error?