title: Android Notification: Flash Message in Notification Area
body: <p>In my Android app, I provide a notification both when a user begins uploading a file and when the file upload is complete.  When the upload begins, the message "Uploading" appears in the Navigation Bar.  I want the message "Uploading complete" to flash in the Navigation Bar when the upload is complete, but the message never appears in the Navigation Bar.  When you expand the Notification drawer, though, the correct message is shown. </p>
  
  <p><strong>How do I get the content title to flash in the navigation bar?</strong></p>
  
  <pre><code>NotificationManager mNotificationManager =
                          (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
                  Constant.currentlyUploading.decrementAndGet();
                  Constant.totalUploadedImages.incrementAndGet();
                  if(Constant.currentlyUploading.get()&gt;0){
                      String files_count;
                      if(Constant.currentlyUploading.get() ==1){
                          files_count = "file";
                      }else{
                          files_count = "files";
                      }
                      Builder uploadBuilder = new NotificationCompat.Builder(context)
                      .setSmallIcon(R.drawable.logo)
                      .setContentTitle("Uploading")
                      .setContentText(Constant.currentlyUploading.get()+ " " + files_count +  " uploading");
                      Notification uploadNotif = uploadBuilder.build();
                      mNotificationManager.notify(Constant.NOTIFICATION_UPLOADING_ID, uploadNotif);
                  }else{
                      // cancel uploading notification
                      CancelNotification(this.context, Constant.NOTIFICATION_UPLOADING_ID);
  
                      String uploaded_count;
                      if(Constant.totalUploadedImages.get()&gt;1){
                          uploaded_count = "files";
                      }else{
                          uploaded_count = "file";
                      }
                      Builder uploadedBuilder = new NotificationCompat.Builder(context)
                      .setSmallIcon(R.drawable.logo)
                      .setContentTitle("Upload complete")
                      .setContentText(Constant.totalUploadedImages.get()+" " + uploaded_count + " uploaded")
                      .setAutoCancel(true);
                      Notification uploadNotif = uploadedBuilder.build();
                      mNotificationManager.notify(Constant.NOTIFICATION_UPLOADED_ID, uploadNotif);    
                      Constant.totalUploadedImages.getAndSet(0);      
  
                  }
                  //Removing one from the step's image upload counter
                  uploadStep.decTotalUploading();
                  if(stepAdapter!=null){
                      stepAdapter.notifyDataSetChanged();
                  }
  
                  //Removing the path from the list of currently uploading images
                  uploadStep.removeCurrentlyUploading(filepath);
  
              }
  </code></pre>
  
  <p>and my Cancel Notification method:</p>
  
  <pre><code>public static void CancelNotification(Context ctx, int notifyId){
      String ns = Context.NOTIFICATION_SERVICE;
      NotificationManager nMgr = (NotificationManager) ctx.getSystemService(ns);
      nMgr.cancel(notifyId);
  }
  </code></pre>