I cannot create a notification using Big View styles. Problems with the support library? My code is in Eclipse order (no errors), but only contentTitle, ContentText, icon ... is displayed in the notification ... this! No extra lines in my notification ... What happened? Thank you very much for your response. Here is the code ...
@Override
protected void onMessage(Context arg0, Intent arg1) {
String message = arg1.getExtras().getString("message");
generateNotification3(arg0, message);
}
private static void generateNotification3(Context context, String message) {
NotificationCompat.Builder mbuilder =
new NotificationCompat.Builder(context)
.setSmallIcon(R.drawable.ic_launcher)
.setContentTitle("lolo")
.setContentText("text")
.setDefaults(Notification.DEFAULT_ALL)
.setStyle(new NotificationCompat.BigTextStyle()
.bigText(message));
Intent resultIntent = new Intent(context, Fsa.class);
TaskStackBuilder stackBuilder = TaskStackBuilder.create(context);
stackBuilder.addParentStack(Fsa.class);
stackBuilder.addNextIntent(resultIntent);
PendingIntent resultPendingIntent = stackBuilder.getPendingIntent(0,
PendingIntent.FLAG_UPDATE_CURRENT);
mbuilder.setContentIntent(resultPendingIntent);
NotificationManager mNotificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
mNotificationManager.notify(100, mbuilder.build());
}
source
share