I am showing several notifications in my android app.
When there is one notification, it is displayed correctly.

But when I create the second notification, the second notification is shown in collapse by default.

If I manually expand the second notification, it displays as:

I want to show notifications in advanced mode by default.
Here is my code:
int num = (int) System.currentTimeMillis();
PendingIntent pendingIntent = PendingIntent.getActivity(this, num , intent,
PendingIntent.FLAG_ONE_SHOT);
NotificationCompat.BigTextStyle bigTextStyle = new NotificationCompat.BigTextStyle();
bigTextStyle.setBigContentTitle(title);
bigTextStyle.bigText(messageBody);
Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.corco)
.setAutoCancel(true)
.setSound(defaultSoundUri)
.setStyle(bigTextStyle)
.setContentIntent(pendingIntent);
NotificationManager notificationManager =
(NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.notify(num , notificationBuilder.build());
Am I missing something? or is something wrong?
Thanks in advance.
source
share