i'm using this react-native-firebase and react-navigation for navigating and i can push notification from server or console successfully whether its in foreground or background but i swear the documentation is not pretty clear how to open notification and navigate to the notification screen it belongs to. these are my onMessage codes.
firebase.messaging().onMessage((payload) => {
if(!payload.opened_from_tray){
firebase.messaging().createLocalNotification({
title: payload.title,
body: payload.body,
show_in_foreground: true,
icon: "ic_launcher",
local_notification: "true",
priority: "high",
click_action:"ACTION",
opened_from_tray: true,
})
}
});
i'm running the version 3.2.2 of react-native-firebase
right now i am not using createLocalNotification(), so am able to receive a notification when my app is closed using getInitialNotification(), :)
i hope it solves your issue too