android - Notificación incorrecta publicada - No se pudo expandir RemoteViews para: StatusBarNotification

stoy tratando de publicar una notificación con una vista personalizada en el área de notificación de un IntentService y obtengo laCouldn't expect RemoteView error.

Esto es lo que estoy haciendo enonCreate():

mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
icon = R.drawable.icon;
tickerText = "data upload in progress";
contentView = new RemoteViews(getApplicationContext().getPackageName(), R.layout.notiflayout);
contentView.setImageViewResource(R.id.image, R.drawable.icon);
contentView.setTextViewText(R.id.text, "Hello");
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;

Estoy llamandonotify() desdeonHandleIntent(), y cancelando las notificaciones enonDestroy().

He verificado que este código funciona en una aplicación independiente, que no tiene unaIntentService. Haciendo esto en unaIntentService de alguna manera está dando problemas.

¿Podría alguien explicarme qué estoy haciendo mal?

¡Gracias

Respuestas a la pregunta(12)

Su respuesta a la pregunta