使用react-native-router-flux单击Firebase通知导航到特定屏幕

时间:2020-04-30 13:44:00

标签: react-native react-native-android react-native-firebase

我在App.js文件的react-native(0.59)中使用react-native-router-flux进行导航,并在同一文件(App.js)中编写代码以使用react-native-firebase接收firebase通知。 js)。

我的代码如下:App.js

   video = WebDriverWait(self.browser, 15).until(EC.visibility_of_element_located((By.ID, "player"))) # The line work perfectly
    print('Fast forward')
    player_status = self.browser.execute_script("document.getElementById('player')[0].currentTime += 80;") # The compiler return an error at this line.
    print('Get Current time')
    time_video = self.browser.execute_script("return document.getElementById('player')[0].currentTime;")

现在我打开了应用程序,当前我将进入HomeScreen并将应用程序置于后台模式。现在,当我收到通知(在后台)时,点击它,我需要导航到特定屏幕(DeskScreen)。我可以导航到特定屏幕(DeskScrene),但是在此之前,我只看到Homescreen了不到一秒钟。我不想看到上一个屏幕,只想在点击通知后立即看到Deskscreen。 请为此提供帮助

0 个答案:

没有答案