title: Handle Firebase topics notification on Android
body: <p>I'm trying to send push notifications throught FCM services.
  In my MainActivity I write this code:</p>
  
  <pre><code>   mRegistrationBroadcastReceiver = new BroadcastReceiver() {
              @Override
              public void onReceive(Context context, Intent intent) {
  
                  // checking for type intent filter
                  if (intent.getAction().equals(Config.REGISTRATION_COMPLETE)) {
                      // gcm successfully registered
                      // now subscribe to `global` topic to receive app wide notifications
                      FirebaseMessaging.getInstance().subscribeToTopic(Config.TOPIC_GLOBAL);
  
                      displayFirebaseRegId();
  
                  } else if (intent.getAction().equals(Config.PUSH_NOTIFICATION)) {
                      // new push notification is received
  
                      String message = intent.getStringExtra("message");
  
                      Toast.makeText(getApplicationContext(), "Push notification: " + message, Toast.LENGTH_LONG).show();
  
                  }
              }
          };
  </code></pre>
  
  <p>In order to subscribe user to a topic.</p>
  
  <p>From backend I make a call to FCM service at this link : <a href="https://fcm.googleapis.com/fcm/send" rel="nofollow noreferrer">https://fcm.googleapis.com/fcm/send</a></p>
  
  <p>in which I pass this JSON:</p>
  
  <pre><code>{  
     "to":"/topics/global",
     "data":{  
        "title":"test",
        "is_background":false,
        "message":"testmessage",
        "image":"",
        "payload":{  
           "team":"Test",
           "score":"5.6"
        },
        "timestamp":"2017-05-23 11:55:35"
     }
  }
  </code></pre>
  
  <p>and I get this response:</p>
  
  <pre><code>{\"message_id\":8863205901902209389}
  </code></pre>
  
  <p>But my device doesn't show any notifaction, exept if I use Firebase console with "user segment" or "single device" . Also in Firebase console doesn't works "topic" way.</p>
  
  <p>Thank you in advance for any response.</p>