React-native-firebase: unable to handle notification click_action to navigate to notification screen or perform a custom action after notification click

Created on 18 Jan 2018  路  3Comments  路  Source: invertase/react-native-firebase

i'm using this library 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. 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 this library i think its the latest

All 3 comments

i did managed to fix this! it was due to my dumbness

Could you please share your fix? Thanks a lot!

Could you please tell us how did you fixed this. I have the same problem.

Was this page helpful?
0 / 5 - 0 ratings