Adding an image to the notification
RN v0.34 Running on Android 6 device
How can we send a image in the notification and show it in the notification tray?
Basic FCM notifications (and thus this package) don't support that. If you want that, you need to:
- send just
datanotifications through the firebase API. - build your own background service that listens for those.
- build a local notification with all the data you want to show.
react-native-fcm supports icon which will display an icon in the notification tray. This can be sent both from a server or as a local notification. Note that this parameter takes an icon name. The actual icon needs to be stored in the standard android mipmap folders and built into your application.
For the notification to be displayed on Android 5.0+, the icon must have a transparent background. If it does not have a transparent background, it just shows up as an empty white square when you pull down notifications.
I would also recommend setting color which sets the background color in the circle behind the notification icon when you pull down notifications.
@shraddha1704 have u solved ur problem?
close due to inactivity