Updating the Progress Bar in the Notification Area
<p>There are several threads already on how to make custom layouts in the notification bar.  The problem is I must be missing something simple.</p>

<p>I have a custom_notification_layout.xml</p>

<pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:orientation="vertical"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
              android:padding="3dip"
              &gt;

    &lt;TextView android:id="@+id/text"
              android:text="Uploading"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:textColor="#000"
              /&gt;

    &lt;ProgressBar  
            style="?android:attr/progressBarStyleHorizontal" 
            android:layout_height="wrap_content" 
            android:layout_width="fill_parent"
            android:max="0" 
            android:progress="0"   
            android:layout_marginLeft="10dip"  
            android:id="@+id/progressBar" 
            /&gt;  
&lt;/LinearLayout&gt;
</code></pre>

<p>I also have some test code that creates the notification, which works and shows the progress bar.</p>

<pre><code>NotificationManager mManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
Notification notification = new Notification(R.drawable.icon, title, System.currentTimeMillis());
RemoteViews contentView = new RemoteViews(context.getPackageName(), R.layout.custom_notification_layout);
contentView.setProgressBar(R.id.progressBar, 10, 0, false);        
contentView.setTextViewText(R.id.text, text);       
notification.contentView = contentView;

Intent notificationIntent = new Intent(context, NotificationHandler.class);
PendingIntent contentIntent = PendingIntent.getActivity(context, 0, notificationIntent, 0);
notification.contentIntent = contentIntent;
mManager.notify(APPID, notification);
</code></pre>

<p>Finally I try to update the progress bar, which doesn't work.</p>

<pre><code>contentView.setProgressBar(R.id.progressBar, 10, 5, false); 
</code></pre>

<p>What is the secret to actually updating the notification?</p>
