title: Firebase Notification Not Receive in onMessageReceived when app is in background
body: <p>I an using <code>FCM</code> for sending a notification in my app and all work perfectly but when my app is in background then the notification is handle by android system notification tray</p>
  
  <p>i want to handle my notification from myself i am sending this payload for send the notification </p>
  
  <pre><code>$fields = array(
          'notification' =&gt; $notification,
          'to'  =&gt; '/topics/updates'
          );
  </code></pre>
  
  <p>this will call my <code>onMessageReceived</code> when my app is in <code>forground</code> but when my app is in background this will not call my <code>onMessageReceived</code> the request is handled by system itself</p>
  
  <p>i want to call my <code>onMessageReceived</code> when my app is in <code>background</code></p>
  
  <p>i am also try to remove <code>notification key</code> and only send <code>data key</code> like this</p>
  
  <pre><code>$fields = array(
          'data' =&gt; $notification,
          'to'  =&gt; '/topics/updates'
          );
  </code></pre>
  
  <p>but when i send the request from above field <code>onMessageReceived</code> is not called in both the condition in <code>forground and background</code></p>
  
  <p>i am try this in my <code>xiaomi redmi note 4 (oreo)</code> , <code>redmi 4x(android 10)</code> and <code>android emulator(marshmello)</code></p>
  
  <p>i am follow this ans for solve my problem but not work for me <a href="https://stackoverflow.com/questions/37711082/how-to-handle-notification-when-app-in-background-in-firebase">How to handle notification when app in background in Firebase</a></p>
  
  <p>my FCM version is <code>17.3.4</code>
  and my android studio version is <code>3.5.3</code></p>