title: display notification Firebase in text view
body: <p>I have implemented firebase cloud messaging in my app. I have been receiving messages I want to display that message in the textview of the app. </p>
  
  <p>Here is the code to handle onMessageReceived..</p>
  
  <pre><code>public class FcmMessagingService extends FirebaseMessagingService {
      private Map&lt;String, String&gt; data;
      private static final String TAG="MyFirebaseMsgService";
      @Override
      public void onMessageReceived(RemoteMessage remoteMessage) {
          super.onMessageReceived(remoteMessage);
          data=remoteMessage.getData();
          String message=data.get("message");
          String titledata=data.get("title");
          ManualNotification(titledata , message);
      }
  private void ManualNotification(String title , String messageBody){
          Intent intent = new Intent(this, MainActivity.class);
          Bundle bundle = new Bundle();
          bundle.putString("message", messageBody);
          intent.putExtras(bundle);
          intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
          PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_ONE_SHOT);
          Bitmap bmp = BitmapFactory.decodeResource(this.getResources(),R.drawable.splash_img);
          Notification.BigPictureStyle bigpicture = new Notification.BigPictureStyle();
          bigpicture.bigPicture(bmp);
          NotificationCompat.Builder notificationBuilder = (NotificationCompat.Builder) new NotificationCompat.Builder(this)
                  .setSmallIcon(R.drawable.notifaction)
                  .setContentTitle(title)
                  //.setContentText(messageBody)
                  .setLargeIcon(bmp)
                  .setContentIntent(pendingIntent)
                  .setStyle(new NotificationCompat.BigTextStyle().bigText(messageBody))
                  .setContentText(messageBody).setLights(Color.YELLOW, 300, 300)
                  .setVibrate(new long[] { 100, 250 })
                  .setDefaults(Notification.DEFAULT_SOUND)
                  .setAutoCancel(true);
          NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
          notificationManager.notify(0, notificationBuilder.build());
      }
  }
  </code></pre>