title: getIntent().getExtras() returns null FCM
body: <p>I spent a few hours researching this with no luck, so I'm asking here. I've already checked these questions to no avail:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/40105215/how-to-get-data-sent-from-server-using-fcm-if-app-is-in-background">How to get data sent from server using fcm if app is in background?</a></li>
  <li><a href="https://stackoverflow.com/questions/40092465/push-notification-not-working-with-fcm">Push notification not working with FCM</a></li>
  <li><a href="https://stackoverflow.com/questions/39046270/google-fcm-getintent-not-returning-expected-data-when-app-is-in-background-state">Google FCM getIntent not returning expected data when app is in background state</a></li>
  </ul>
  
  <p>Up until today (AFAIK — I haven't tested it in a while), Firebase Cloud Messaging was working just fine. I could send a notification with data from the Firebase Console, and using <code>getIntent().getExtras()</code> would allow me to access that data from the app.</p>
  
  <p>Today, however, I sent a test notification, but tapping it did not perform the expected action. After some digging, I found out that <code>getIntent().getExtras()</code> was just returning <code>null</code> no matter what. This is the relevant code:</p>
  
  <pre><code>private void respondToNotificationClick() {
      if (getIntent().getExtras() != null) {
          Log.e("NOTIF", "NOTIF");
          //...
      }
  }
  </code></pre>
  
  <p>(This method is called from both <code>onCreate()</code> and <code>onResume()</code> in the main activity.)</p>
  
  <p>But that log is never printed, and if I try to log <code>Intent.getExtras()</code> outside of the <code>if</code> statement, I get an NPE.</p>
  
  <p>I suspect it has something to do with Firebase 11 vs 10 or maybe that this app is targeting API 26, but I just can't figure out how to fix it, and Google's documentation isn't always the most helpful.</p>
  
  <p>What's going on here? Is it a known issue? Is it because I'm using a beta API (even though it's supposed to have been finalized)?</p>