title: How to retrieve notification message intent.getExtras() when app is background FCM
body: <p>I am using FCM for Simple notification </p>
  
  <p>When the app is in foreground, everything working properly. I am getting a notification plus the data message inside the <code>onMessageReceived</code> method.</p>
  
  <p>But when app is in background, I am getting notification in system tray. And when I click on the control, it goes to the main activity. And When I parse <code>intent.getExtras();</code>, I am getting only this key data - <code>google.sent_time</code>, <code>from</code>, <code>google.message_id</code>, <code>collapse_key</code>.</p>
  
  <p>How to get the notification message title and Message which is visible in system tray from <code>intent.getExtras()</code>?</p>
  
  <p>I am using FCM console for sending notification I don't have my dedicated server to do this.</p>
  
  <p>Code for receiving the message:</p>
  
  <pre><code>final Bundle extras = intent.getExtras(); 
  final Set&lt;String&gt; keySet = extras.keySet(); 
  final Iterator&lt;String&gt; iterator = keySet.iterator(); 
  while (iterator.hasNext()) {     
      final String key = iterator.next(); 
      final Object o = extras.get(key); 
      System.out.println(key + ":" + o); 
  } 
  </code></pre>