title: React Native - How to open route from push notification
body: <p>I'm using <code>react-navigation</code> and <code>react-native-push-notification</code>. How can I open a certain <code>StackNavigator's</code> screen in <code>onNotification</code> callback? Should work when:</p>
  
  <ul>
  <li>app is closed</li>
  <li>app is in the foreground</li>
  <li>app is in the background</li>
  </ul>
  
  <p>I only need it working in Android for now.</p>
  
  <p>I've tried to pass a callback function to notification in my component: </p>
  
  <pre><code>_handleClick() {
    PushNotification.localNotification({
      foreground: false
      userInteraction: false
      message: 'My Notification Message'
      onOpen: () =&gt; { this.props.navigation.navigate("OtherScreen") },
    })
  }
  </code></pre>
  
  <p>And to fire <code>onOpen</code> in <code>PushNotification</code> config:</p>
  
  <pre><code>onNotification: function(notification) {
     notification.onOpen()
  }
  </code></pre>
  
  <p>But it seems that functions can't be passed to notification, unless a value is a string it's ignored, causing <code>onOpen</code> to be undefined.</p>