I used to read this topic about NotificationCompat and I know that the contentIntent is required on Gingerbread and below. However, I'm working in android Gingerbread and I don't want to add PendingIntent. What should I do to have the correct notification?
Thanks for your help
NotificationCompat.Builder builder = new NotificationCompat.Builder(this);
builder.setAutoCancel(true);
builder.setContentTitle("Basic notification");
builder.setContentText(content);
builder.setSmallIcon(R.drawable.ic_launcher);
Notification notification = builder.build();
try {
NotificationManager manager = (NotificationManager) this
.getSystemService(NOTIFICATION_SERVICE);
manager.notify(8, notification);
} catch (Exception e) {
Log.i("Exception", e.getMessage());
}
Exception : contentIntent required: pkg=com.example.notificationtutorial id=8 notification=Notification(vibrate=null,sound=null,defaults=0x0,flags=0x10)