If the app is in the background while it receives a notifcation, it will use the app icon in the notification rather than using the notification icon even if it is set.
This issue does not occur when in the foreground.
React Native: 0.61.5
React Native Notifications: 3.1.2
Using FCM
You need to add
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/notification_icon" />
To your manifest to set the background notification icon.
@alexparlett Thank you very much! I believe this should be added to the documentation somewhere and will leave this issue open until this info is easily discoverable.
Make sure the name of the icon is notification_icon else it won't work. Thanks to @tingzhouu
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
The issue has been closed for inactivity.
Most helpful comment
You need to add
<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/notification_icon" />To your manifest to set the background notification icon.