title: Accessing React Native Firebase remote input notificationOpen.results when app is not in foreground
body: <p>After building a notification and adding a remote input and action using react native firebase, the user input doesn't console log when the app is not foregrounded or on screen. At this point, notificationOpen.results defaults to undefined where it would otherwise be populated with the users response after they click send. Below is the code to add the remote input and to listen for the response. </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>export const backgroundMessageListener = async (message) =&gt; {
    console.log(message);
    const { data } = message;
    const notification = new firebase.notifications.Notification()
    .setTitle(data.title)
    .setBody(data.body)
    .setSound('default')
    .android.setSmallIcon('notification')
    .android.setColor(colors.primary.normal)
    .android.setAutoCancel(true)
    .android.setLargeIcon(data.icon)
    .android.setChannelId(data.channel)
    .android.setPriority(firebase.notifications.Android.Priority.Max);
  
    if (!notification.android.channelId) {
      notification.android.setChannelId('misc_channel');
    } else {
      // Build an action
      const action = new firebase.notifications.Android.Action('reply', 'check-mark', `Reply to ${notification.title}`);
      action.setShowUserInterface(false);
  
      // Build a remote input
      const remoteInput = new firebase.notifications.Android.RemoteInput('input')
      .setLabel('Reply')
      .setAllowFreeFormInput(true);
  
      // Add the remote input to the action
      action.addRemoteInput(remoteInput);
  
      // Add the action to the notification
      notification.android.addAction(action);
    }
  
    // display the notification
    firebase.notifications().displayNotification(notification);
  
    return Promise.resolve();
  };
  
  export const backgroundActionHandler = async (notificationOpen) =&gt; {
    if (notificationOpen.action === 'reply') {
      console.log(notificationOpen);
    }
    return Promise.resolve();
  };</code></pre>
  </div>
  </div>
  </p>