title: Bad notification posted - Couldn't expand RemoteViews for: StatusBarNotification
body: <p>I am trying to post a notification with a custom view in the notification area from an <code>IntentService</code>, and getting the <code>Couldn't expand RemoteView</code> error.</p>
  <p>Here's what I am doing in <code>onCreate()</code>:</p>
  <pre><code>mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
  icon = R.drawable.icon;
  tickerText = &quot;data upload in progress&quot;;
  contentView = new RemoteViews(getApplicationContext().getPackageName(), R.layout.notiflayout);
  contentView.setImageViewResource(R.id.image, R.drawable.icon);
  contentView.setTextViewText(R.id.text, &quot;Hello&quot;);
  contentView.setProgressBar(R.id.progressBar, 100, 10, false);
  whatNext = PendingIntent.getActivity(getApplicationContext(), 0, new Intent(getApplicationContext(), starterActivity.class), 0);
  notification = new Notification(icon, tickerText, System.currentTimeMillis());
  notification.contentView = contentView;
  notification.contentIntent = whatNext;
  </code></pre>
  <p>I am calling <code>notify()</code> from <code>onHandleIntent()</code>, and canceling the notifications in <code>onDestroy()</code>.</p>
  <p>I have verified that this code works in an independent app, which does not have an <code>IntentService</code>. Doing this in an <code>IntentService</code> is somehow giving trouble.</p>
  <p>Could someone please explain what is it that I am doing wrong?</p>