title: FCM push notification not received when app is killed/swiped out
body: <p>I am migrating notification to FCM from GCM. In GCM, I was able to receive notification when app was in foreground, background or killed, but in FCM, I am not able to receive notification when app is not opened/killed by swipe out. Am I missing anything????</p>
  
  <p>AndroidManifest.xml</p>
  
  <pre><code>    &lt;service
          android:name=".Services.ExtendedInstanceIDListenerService"
          android:exported="false"&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="com.google.firebase.INSTANCE_ID_EVENT" /&gt;
          &lt;/intent-filter&gt;
      &lt;/service&gt;
      &lt;service
          android:name=".Services.FcmMessageHandler"           
          android:exported="false"&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>FCMMessageHandler.java</p>
  
  <p>public class FcmMessageHandler extends FirebaseMessagingService {</p>
  
  <pre><code>@Override
  public void onMessageReceived(RemoteMessage message) {
  
      // Check if message contains a data payload.
      if (message.getData().size() &gt; 0) {
          Log.d("ABC", "Message data payload: " + message.getData());
      }
  
  sendNotification("test");
  }
  
   private void sendNotification(String message) {
  
   Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
          NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)
                  .setSmallIcon(getNotificationIcon())
                  .setColor(getResources().getColor(R.color.button_background))
                  //.setLargeIcon(BitmapFactory.decodeResource(getResources(), R.drawable.icon))
                  .setContentTitle("App")
                  .setStyle(new NotificationCompat.BigTextStyle().bigText(message))
                  .setDefaults(Notification.DEFAULT_ALL)
                  .setPriority(Notification.PRIORITY_MAX)
                  .setContentText(message)
                  .setAutoCancel(true)
                  .setSound(defaultSoundUri)
          Notification notification = notificationBuilder.build();
          notification.flags |= Notification.FLAG_AUTO_CANCEL;
  
          NotificationManager notificationManager =
                  (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
  
          notificationManager.notify(notificationNumber /* ID of notification */, notification);
  
  }
  
  private int getNotificationIcon() {
      boolean useWhiteIcon = (android.os.Build.VERSION.SDK_INT &gt;= android.os.Build.VERSION_CODES.LOLLIPOP);
      return useWhiteIcon ? R.drawable.ic_notification : R.drawable.ic_launcher;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>json request body :</p>
  
  <pre><code>{
    "notification":{
       "title":"Title",
       "message":"Message.",
       "icon" = "ic_notification",
       "sound" = "default",
       "click_action":"FCM_PLUGIN_ACTIVITY"
    },
    "data":{
       "title":"Title",
       "message":"Message.",
       "icon" = "ic_notification",
       "sound" = "default"
    },
      "to":"chIFk6ljlfdskfdsifosdifnodsifnsdofindsofindsfoindsifvndsnmdkslakjdn2p",
      "priority":"high"
  }
  </code></pre>