title: Not Receiving "custom push Notification" when app is in background in android devices on Oreo and above devices
body: <p>I am working chat application. I want to show custom push Notification when message receives, when app is open and closed (not destroyed or killed) notification are received, below code is working fine, but when app is killed or destroyed from background custom push notification is not received in oreo and above</p>
  
  <p>Here is code I Used</p>
  
  <pre><code>@Override
  public void onMessageReceived(RemoteMessage remoteMessage) {
  
      try {
         context = getApplicationContext();
          Map&lt;String, String&gt; data = remoteMessage.getData();
         if ("message".equals(data.get("pushNotificationAction"))){
          System.out.println("message");
  
  
          intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
          PendingIntent contentIntent = PendingIntent.getActivity(getApplicationContext(),
                  0, intent, 0);
          String mediatype = data.get("mediaType");
          String mesageType= data.get("messageType");     
  
              String channel_id = createNotificationChannel(getApplicationContext());
              mBuilder = new NotificationCompat.Builder(getApplicationContext(),channel_id)
                      .setSmallIcon(R.drawable.kisan_smoll_logo1)
                      .setCustomBigContentView(contentViewBig)
                      .setCustomContentView(contentViewBig)
                      .setContentIntent(contentIntent)
                      .setContentTitle(data.get("messageText"))
                      .setWhen(when)
                      .setDefaults(Notification.DEFAULT_ALL)
                      .setPriority(NotificationManager.IMPORTANCE_MAX)
                      .setAutoCancel(true);
  
  
              NotificationManager mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
  
              mNotificationManager.notify(1, mBuilder.build());
  
        }catch(Exception e){
              e.printStackTrace();
             }
  </code></pre>
  
  <p>Sending JSON from server is below:</p>
  
  <pre><code>     {
    "message":{
     "to": "FCMID", 
  "data" : {
       "body" : "This is a Message!",
       "title" : "Notifiation Message"
   "mediaType":"IMAGE",
   "messageType":"chat",
        }
    }
  }
  </code></pre>
  
  <p>By sending <strong>data</strong> from server custom Fcm push notification is received in android when app is open, but when app is swipe from recent notifications are not received </p>