push big view style

1

I would like push messages to have several lines but I can not get this out, this is the code I use.

  NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)
                .setSmallIcon(R.mipmap.ic_launcher)
                .setContentTitle(messageBody)
                .setAutoCancel(true)
                .setSound(defaultSoundUri)
                .setStyle(new NotificationCompat.BigTextStyle().bigText(messageBody));
    
asked by jorje garcia 04.09.2016 в 19:56
source

1 answer

1

I think there is a misunderstanding, you are creating a notification BigTextStyle therefore your notification is shown in multilines.

When you receive it, it should be shown in this way, the title and a line of the description:

and when you expand it you can already see the information in several lines:

The same applies to the notification BigPictureStyle , the title and a single line are displayed:

By expanding it you can see the detail and completely the photo:

    
answered by 05.09.2016 / 20:48
source