title: Android - Push notification blank when not on top of the bar
body: <p>I'm having a small issue with android push notifications</p>
  
  <p>If there are 3 Notifications and only one of these displays the title and the message. The one which is on the top of the bar. If anyone has any idea what might be the issue please let me know</p>
  
  <p>Refer image on this link, this is how i am able to receive notifications 
  <a href="http://postimg.org/image/3z4a21ssp/" rel="nofollow">http://postimg.org/image/3z4a21ssp/</a></p>
  
  <pre><code>public void createNotification(Context context, Bundle extras)
  {
      NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
      String appName = getAppName(this);
  
      Intent notificationIntent = new Intent(this, PushHandlerActivity.class);
      notificationIntent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP);
      notificationIntent.putExtra("pushBundle", extras);
  
      PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);
  
      NotificationCompat.Builder mBuilder =
          new NotificationCompat.Builder(context)
              .setDefaults(Notification.DEFAULT_ALL)
              .setSmallIcon(context.getApplicationInfo().icon)
              .setWhen(System.currentTimeMillis())
              //.setContentTitle(extras.getString("title"))
              //.setTicker(extras.getString("title"))
              .setContentIntent(contentIntent);
  
      String message = extras.getString("message");
  
  
      //Added Try catch in case the old code doesnt work !
      try{
          //chgpk: Added this code to get bigger notification window
          NotificationCompat.BigTextStyle inboxStyle = new NotificationCompat.BigTextStyle();
          inboxStyle.setBigContentTitle(extras.getString("title"));
          inboxStyle.bigText(message);        
          mBuilder.setStyle(inboxStyle);
  
      }catch(Exception ex){
          if (message != null) {
              mBuilder.setContentText(message);
          } else {
              mBuilder.setContentText("&lt;missing message content&gt;");
          }
  
          NotificationCompat.InboxStyle inboxStyleEx =
                  new NotificationCompat.InboxStyle();
          inboxStyleEx.setBigContentTitle(extras.getString("title"));
          inboxStyleEx.addLine(message);
          mBuilder.setStyle(inboxStyleEx);
      }
  
  
      String msgcnt = extras.getString("msgcnt");     
      if (msgcnt != null) {
          mBuilder.setNumber(Integer.parseInt(msgcnt));
      }
  
      MY_NOTIFICATION_ID++;
      //mNotificationManager.notify((String) appName, NOTIFICATION_ID, mBuilder.build());
      mNotificationManager.notify((String) appName, MY_NOTIFICATION_ID, mBuilder.build());
  
  
  }
  </code></pre>
  
  <p>Also Code from DOT NET IS</p>
  
  <pre><code> WebRequest tRequest;
          //tRequest = WebRequest.Create("https://android.googleapis.com/gcm/send");
          tRequest = WebRequest.Create(vANDR_PN_url);
  
          tRequest.Method = "post";
          tRequest.ContentType = " application/x-www-form-urlencoded;charset=UTF-8";
          tRequest.Headers.Add(string.Format("Authorization: key={0}", GoogleAppID));
  
          tRequest.Headers.Add(string.Format("Sender: id={0}", SENDER_ID));
  
          string postData =
              "collapse_key=score_update&amp;"
              + "time_to_live=108"
              + "&amp;delay_while_idle=1"
              + "&amp;data.message=" + value
              + "&amp;data.time=" + System.DateTime.Now.ToString()
              + "&amp;data.title=" + contentTitle
              + "&amp;data.redirect_to_page=" + vredirect_to_page
              + "&amp;registration_id=" + deviceId + "";
  
          Console.WriteLine(postData);
          Byte[] byteArray = Encoding.UTF8.GetBytes(postData);
          tRequest.ContentLength = byteArray.Length;
  
          Stream dataStream = tRequest.GetRequestStream();
          dataStream.Write(byteArray, 0, byteArray.Length);
          dataStream.Close();
  
          WebResponse tResponse = tRequest.GetResponse();
  
          dataStream = tResponse.GetResponseStream();
  
          StreamReader tReader = new StreamReader(dataStream);
  
          String sResponseFromServer = tReader.ReadToEnd();
  
          System.IO.File.AppendAllText(LogFilePath, Environment.NewLine + "sResponseFromServer &gt;&gt; " + sResponseFromServer);
          if (sResponseFromServer == "Error=InvalidRegistration") {
              mStatus = "error";
          }
  
          tReader.Close();
          dataStream.Close();
          tResponse.Close();
  </code></pre>