title: Firebase Cloud Messaging onMessageReceived not getting triggered
body: <p>As instructed in Firebase <a href="https://firebase.google.com/docs/cloud-messaging/android/client#manifest" rel="nofollow">dev docs</a>, I've implemented a Service that extends FirebaseMessagingService and overrides the onMessageReceived callback. I have put a Log message in the first line inside the onMessageReceived method. </p>
  
  <p><strong>App running in background</strong>
  I don't see the log in logcat but I see a Notification posted in the system try. </p>
  
  <p><strong>App in Foreground</strong>
  I neither see the log nor the notification in system tray </p>
  
  <p>Any idea what's going on?</p>
  
  <p>Manifest</p>
  
  <pre><code>   &lt;service
          android:name=".fcm.MovieMessagingService"&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="com.google.firebase.MESSAGING_EVENT"/&gt;
          &lt;/intent-filter&gt;
      &lt;/service&gt;
  </code></pre>
  
  <p>Service Class</p>
  
  <pre><code>public class MovieMessagingService extends FirebaseMessagingService {
  
      private static final String LOG_TAG = MovieMessagingService.class.getSimpleName();
  
      @Override
      public void onMessageReceived(RemoteMessage remoteMessage) {
  
  
          Log.d(LOG_TAG, "From: " + remoteMessage.getFrom());
  
      }
  
      /**
       * Create and show a simple notification containing the received FCM message.
       *
       * @param messageBody FCM message body received.
       */
      private void sendNotification(String messageBody) {
          Log.d(LOG_TAG, "Presenting Notification with message body: " + messageBody);
  //more code
      }
  }
  </code></pre>