Hello currently I’m working on react native project and having a problem on firebase push notification
as for the background notification is working but on foreground not working
in the documentation did tell to use onMessage
method, in the console I can see it trigger but the notification doesn’t appear at the top
can anybody guide me on how to do this
Thanks in advance
@irsyadmhdilham This is definitely something you’d have to build into your app then – there’s certainly no way for FCM to know what screen you’re on in your app and control whether to show it.
react-native-firebase does currently have the ability to display a local notification, so you could listen for the onMessage() and then do the following:
Just be aware, we are considering moving this out of the main react-native-firebase library into a standalone library in the future.