title: Notification status bar text
body: <p>I want to implement a notification that shows internet speed in status bar of android also I want that this notification not removable by user and only removable by application itself.<br>
  I'd looked at <code>NotificationCompat.Builder</code> Api but I could not find any Api for setting text in status bar that updates regularly.<br>
  I know that it is possible to implementing this feature but I don't know how to implement it.<br>
  I found an app that implements it very well it's name is <code>internet speed meter lite</code>.<br>
  As you know this feature could not be implemented by <code>setSmallIcon</code> of  <code>NotificationCompat.Builder</code>.<br>
  I put images for better understanding.<br>
  Internet speed in status bar of android:<br>
  <strong>Image 1</strong><br>
  <img src="https://i.stack.imgur.com/pzjk5.png" alt="Internet speed in status bar of android![][1]"><br>
  <strong>Image 2</strong><br>
  <img src="https://i.stack.imgur.com/5eWUu.png" alt="enter image description here"><br>
  Notification that is not removable by user:<br>
  <strong>Image 3</strong><br>
  <img src="https://i.stack.imgur.com/1A6LU.png" alt="Notification that is not removable by user"></p>
  
  <p><strong>Update:</strong><br>
  This is my code for notification but it did not action as I want.<br>
  I used ticker text in my notification for showing speed to user but it did not action as I want.  </p>
  
  <pre><code>public class DownloadSpeedNotification {
  
  private NotificationCompat.Builder mBuilder;
  private Context mContext;
  private static final int NOTIFICATION_ID = 2;
  
  public DownloadSpeedNotification(Context context) {
      mContext = context;
      mBuilder = new NotificationCompat.Builder(context)
              .setSmallIcon(R.drawable.notification_icon).
                      setContentText("Download meter content text").
                      setContentTitle("Download meter content title");
  
      Intent intent = new Intent(context, MainActivity.class);
      PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent,
              PendingIntent.FLAG_UPDATE_CURRENT);
      mBuilder.setContentIntent(pendingIntent);
  }
  
  public void alert() {
      // Gets an instance of the NotificationManager service
      NotificationManager mNotifyMgr =
              (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);
      // Builds the notification and issues it.
      mNotifyMgr.notify(NOTIFICATION_ID, mBuilder.build());
  }
  
  public void setSpeed(String speed) {
      mBuilder.setTicker(speed);
  }
  }
  </code></pre>
  
  <p>And this is code that use above class to notify user:  </p>
  
  <pre><code>downloadSpeedNotification.setSpeed(Formatter.humanReadableByteCount(rx, true));
          downloadSpeedNotification.alert();
  </code></pre>
  
  <p>Above code called every 1 second.</p>