title: How to troubleshoot Android not displaying Firebase push notifications, despite device registered and API showing success
body: <p>I have a React Native app that uses <a href="https://github.com/zo0r/react-native-push-notification" rel="nofollow noreferrer">https://github.com/zo0r/react-native-push-notification</a> to manage push notifications.
  Attempting to migrate from GCM to FCM messages on Android is not working, and I cannot find a way to debug the issue.</p>
  
  <p>I have:</p>
  
  <ul>
  <li>Removed all GCM-specific components</li>
  <li>Followed <a href="https://firebase.google.com/docs/cloud-messaging/android/client" rel="nofollow noreferrer">https://firebase.google.com/docs/cloud-messaging/android/client</a></li>
  <li>Followed instructions from react-native-push-notification</li>
  <li>Successfully built and run the app</li>
  <li>When sending a notification via the Firebase console - it detects that there is 1 user to send to, but it never gets received on the device</li>
  <li>When sending via the API <a href="https://fcm.googleapis.com/fcm/send" rel="nofollow noreferrer">https://fcm.googleapis.com/fcm/send</a>, the response indicates success, despite the notification not being received on the device</li>
  <li>Confirmed device has permission to receive notifications</li>
  <li>Tested with app in background</li>
  </ul>
  
  <p>AndroidManifest.xml relevant parts:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;manifest...&gt;
      &lt;uses-permission android:name="android.permission.VIBRATE" /&gt;
      &lt;uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/&gt;
      &lt;application...&gt;
          &lt;meta-data  android:name="com.dieam.reactnativepushnotification.notification_channel_name"
                  android:value="CHANNEL NAME"/&gt;
          &lt;meta-data  android:name="com.dieam.reactnativepushnotification.notification_channel_description"
                      android:value="CHANNEL DESCRIPTION"/&gt;
          &lt;meta-data  android:name="com.dieam.reactnativepushnotification.notification_color"
                      android:resource="@android:color/white"/&gt;
          &lt;activity...&gt;
          &lt;receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationPublisher" /&gt;
          &lt;receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationBootEventReceiver"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.BOOT_COMPLETED" /&gt;
              &lt;/intent-filter&gt;
          &lt;/receiver&gt;
          &lt;service android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationRegistrationService"/&gt;
  
          &lt;service
              android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationListenerService"
              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;
      &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p>app/build.gradle includes:</p>
  
  <pre><code>dependencies {
  ...
      implementation "com.google.firebase:firebase-core:16.0.1"
      implementation "com.google.firebase:firebase-messaging:17.5.0"
  }
  apply plugin: 'com.google.gms.google-services'
  </code></pre>
  
  <p>build.gradle includes:</p>
  
  <pre><code>buildscript {
  ...
      dependencies {
          classpath 'com.google.gms:google-services:4.0.1'
          classpath 'com.android.tools.build:gradle:3.0.0'
      }
  ...
  }
  </code></pre>
  
  <p>google-services.json has been placed correctly with matching package name.</p>
  
  <p><a href="https://fcm.googleapis.com/fcm/send" rel="nofollow noreferrer">https://fcm.googleapis.com/fcm/send</a><br>
  POST Request (IDs removed)</p>
  
  <pre><code>Header "Authorization: key=AUTH_KEY"
  {
    "to": "DEVICE_TOKEN",
    "notification":
      {
         "title": "Test",
         "body": "Test"
      },
    "priority": 10
  }
  </code></pre>
  
  <p>Response (IDs removed)</p>
  
  <pre><code>{
    "multicast_id": MULTICAST_ID,
    "success": 1,
    "failure": 0,
    "canonical_ids": 0,
    "results":
    [
      {
        "message_id": "0:MESSAGE_ID"
      }
    ]
  }
  </code></pre>
  
  <p>Firebase console when sending test message to app shows:</p>
  
  <pre><code>This campaign targets 1 app user(s) (100% of potential users)
  </code></pre>
  
  <p>Indicates device has been registered, and can send the campaign, however it is never displayed on the device.</p>
  
  <p>How can I determine why the message is not displayed on the device?</p>