React native 等待用户单击react native fcm中的通知

React native 等待用户单击react native fcm中的通知,react-native,React Native,Im使用react-native fcm进行推送通知。当通知到来时,它不会重定向到其他组件。它不会等待用户单击。 FCM.on("FCMNotificationReceived", (notif) => { console.log("Notification", notif); if(notif.click_action === "ACTION"){ Actions.login() } } 创建本地通知时,需要将自动取消添加为false。(默认值为true) FCM

Im使用react-native fcm进行推送通知。当通知到来时,它不会重定向到其他组件。它不会等待用户单击。

FCM.on("FCMNotificationReceived", (notif) => {
  console.log("Notification", notif);
  if(notif.click_action === "ACTION"){
    Actions.login()
  }
 }

创建本地通知时,需要将自动取消添加为false。(默认值为true)

FCM.presentLocalNotification({
            id: "UNIQ_ID_STRING",        
            title: "My Notification Title",   
            body: "My Notification Message",   
            sound: "default",    
            priority: "high",       
            click_action: "ACTION",       
            auto_cancel: false,          
            large_icon: "ic_launcher",         
            icon: "ic_launcher",                            
            big_text: "Show when notification is expanded", 
            sub_text: "This is a subText",           
            vibrate: 300,              
            wake_screen: true,      
            group: "group",
            picture: "https://google.png",
            show_in_foreground
        });