title: App is not receiving any Firebase cloud message
body: <p>I'm trying to open certain activity with firebase cloud messaging. I'm trying to send this following JSON as notification to open <code>DAILYDOSE</code> activity.</p>
  
  <pre><code>{
    "to": 
      "/topics/DAILY_DOSE"
    ,
    "data": {
      "extra_information": "This is some extra information"
    },
    "notification": {
      "title": "NEW NOTIFICATION!",
      "text": "Click me to open an Activity!",
      "click_action": "DAILYDOSE"
    }
  }
  </code></pre>
  
  <p>But I'm not sure why I'm not getting any notification in my app.
  Here is the <code>FirebaseMessagingService</code> class where I process the notification:</p>
  
  <pre><code>public class FirebaseMessagingService extends com.google.firebase.messaging.FirebaseMessagingService {
  
      private static final String TAG = "FirebaseMessagingService";
  
      public FirebaseMessagingService() {}
  
      @Override
      public void onMessageReceived(RemoteMessage remoteMessage) {
          // Check if message contains a data payload.
          if (remoteMessage.getData().size() &gt; 0) {
              Log.d(TAG, "Message data payload: " + remoteMessage.getData());
              try {
                  JSONObject data = new JSONObject(remoteMessage.getData());
                  String jsonMessage = data.getString("extra_information");
                  Log.d(TAG, "onMessageReceived: \n" +
                      "Extra Information: " + jsonMessage);
              } catch (JSONException e) {
                  e.printStackTrace();
              }
          }
  
          // Check if message contains a notification payload.
          if (remoteMessage.getNotification() != null) {
              String title = remoteMessage.getNotification().getTitle(); //get title
              String message = remoteMessage.getNotification().getBody(); //get message
              String click_action = remoteMessage.getNotification().getClickAction(); //get click_action
  
              Log.d(TAG, "Message Notification Title: " + title);
              Log.d(TAG, "Message Notification Body: " + message);
              Log.d(TAG, "Message Notification click_action: " + click_action);
  
              sendNotification(title, message, click_action);
          }
      }
  
      @Override
      public void onDeletedMessages() {
  
      }
  
      private void sendNotification(String title, String messageBody, String click_action) {
          Intent intent;
          if (click_action.equals("DAILYDOSE")) {
              intent = new Intent(this, DailyDose.class);
              intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
          } else {
              intent = new Intent(this, ProfileActivity.class);
              intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
          }
  
          PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 /* Request code */ , intent,
              PendingIntent.FLAG_ONE_SHOT);
  
          Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
          NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)
              .setSmallIcon(R.mipmap.ic_launcher)
              .setContentTitle(title)
              .setContentText(messageBody)
              .setAutoCancel(true)
              .setSound(defaultSoundUri)
              .setContentIntent(pendingIntent);
  
          NotificationManager notificationManager =
              (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
  
          notificationManager.notify(0 /* ID of notification */ , notificationBuilder.build());
      }
  }
  </code></pre>
  
  <p>I have defined the <code>topic</code> in my <code>ProfileActivity</code> activity:</p>
  
  <pre><code>public class ProfileActivity extends AppCompatActivity {
  
      private TextView userName, emailAddress, emailVerified;
      private FirebaseAuth mAuth;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_profile);
  
          mAuth = FirebaseAuth.getInstance();
  
          FirebaseMessaging.getInstance().subscribeToTopic("DAILY_DOSE");
      }
  
  }
  </code></pre>
  
  <p>And here is my Manifest</p>
  
  <pre><code>&lt;application
     android:allowBackup="true"
     android:icon="@mipmap/ic_launcher"
     android:label="@string/app_name"
     android:roundIcon="@mipmap/ic_launcher_round"
     android:supportsRtl="true"
     android:theme="@style/AppTheme"&gt;
     &lt;activity android:name=".LoginActivity"&gt;
        &lt;intent-filter&gt;
           &lt;action android:name="android.intent.action.MAIN" /&gt;
           &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
        &lt;/intent-filter&gt;
     &lt;/activity&gt;
     &lt;activity android:name=".SignUpActivity" /&gt;
     &lt;activity android:name=".ProfileActivity" /&gt;
     &lt;activity android:name=".DailyDose"&gt;
        &lt;intent-filter&gt;
           &lt;action android:name="DAILYDOSE"&gt;&lt;/action&gt;
           &lt;category android:name="android.intent.category.DEFAULT"&gt;&lt;/category&gt;
        &lt;/intent-filter&gt;
     &lt;/activity&gt;
     &lt;service
        android:name=".FirebaseMessagingService"&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;
  </code></pre>
  
  <p>I'm not sure why I'm not receiving any notification.</p>