Image Doesn't show in Notification React Native Firebase

Viewed 106

I have a problem with images in notification with rnfirebase v5.6.0. I receive image from messaging and the image link correct but can't show the image in notification. It does not happen at all the time, it happens in some unknown situations. This is my display notification code


const notification = new firebase.notifications.Notification({
 sound: 'default',
 show_in_foreground: true,
})
 .setNotificationId(notificationId)
 .setTitle(notificationData.title)
 .setBody(notificationData.body)
 .setData(notificationData.data)
 .android.setColor('#ffffff')
 .android.setAutoCancel(true)
 .android.setChannelId('channelId')
 .android.setSmallIcon('ic_stat_name')
 .android.setPriority(firebase.notifications.Android.Priority.Max)
 .android.setBigPicture(message._android._bigPicture.picture)
 .android.setLargeIcon(message._android._largeIcon);

firebase.notifications().displayNotification(notification);

For more information my react native version is 0.61.5 and my react-native-firebase version is 5.6.0.

1 Answers

Update the react-native-firebase package to version 6.0.0 and above and use notifee package for notifications

Related