title: Refresh layout when get push notification
body: <p>How can I refresh layout when get push notification? 
  I get class:</p>
  
  <pre><code>    @Override
      protected void onHandleIntent(Intent intent) {
          Bundle extras = intent.getExtras();
          GoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(this);
          // The getMessageType() intent parameter must be the intent you received
          // in your BroadcastReceiver.
          String messageType = gcm.getMessageType(intent);
  
          if (!extras.isEmpty()) {  // has effect of unparcelling Bundle
              /*
               * Filter messages based on message type. Since it is likely that GCM will be
               * extended in the future with new message types, just ignore any message types you're
               * not interested in, or that you don't recognize.
               */
              if (GoogleCloudMessaging.MESSAGE_TYPE_SEND_ERROR.equals(messageType)) {
                  sendNotification("Send error: " + extras.toString());
              } else if (GoogleCloudMessaging.MESSAGE_TYPE_DELETED.equals(messageType)) {
                  sendNotification("Deleted messages on server: " + extras.toString());
                  // If it's a regular GCM message, do some work.
              } else if (GoogleCloudMessaging.MESSAGE_TYPE_MESSAGE.equals(messageType)) {
                  // This loop represents the service doing some work.
                  for (int i = 0; i &lt; 5; i++) {
  
                      try {
                          Thread.sleep(5000);
                      } catch (InterruptedException e) {
                      }
                  }
                  // Post notification of received message.
                  message = extras.getString("message");
                  badgeCount = extras.getString("badge");
                  sendNotification("Received: " + extras.toString());
              }
          }
          // Release the wake lock provided by the WakefulBroadcastReceiver.
          GcmBroadcastReceiver.completeWakefulIntent(intent);
      }
  
      // Put the message into a notification and post it.
      // This is just one simple example of what you might choose to do with
      // a GCM message.
      private void sendNotification(String msg) {
  
          int requestID = (int) System.currentTimeMillis();
  
          mNotificationManager  = (NotificationManager)getApplication().getSystemService(Context.NOTIFICATION_SERVICE);
  
          Intent notificationIntent = new Intent(getApplicationContext(), MainPageActivity.class);
  
          notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
  
          PendingIntent contentIntent = PendingIntent.getActivity(this, requestID,notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);
  
          NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(getApplicationContext())
                  .setSmallIcon(R.drawable.icons)
                  .setContentTitle(getString(R.string.app_name))
                  .setStyle(new NotificationCompat.BigTextStyle()
                          .bigText(message))
                  .setContentText(message).setAutoCancel(true);
          mBuilder.setContentIntent(contentIntent);
          mNotificationManager.notify(NOTIFICATION_ID, mBuilder.build());
  
          try {
              if(Integer.parseInt(badgeCount) != 0)
                  ShortcutBadger.setBadge(getApplicationContext(), Integer.parseInt(badgeCount));
          } catch (ShortcutBadgeException e) {
              //handle the Exception
          }
  
  
      }
  
  }
  </code></pre>
  
  <p>where I receive push  notification. So, when I am in first activity and get push notification I want to refresh all this activity. This should work with 3 activities, so when I am in second activity and get push so this second activity should recreate. Any ideas how can I do that?</p>