2

After I send a notification:

NotificationCompat.Builder mBuilder =
                new NotificationCompat.Builder(context)
                        .setSmallIcon(myVarSmallIconResId)
                        .setContentTitle(myVarTitle)
                        .setContentText(myVarText);

//set bigPicture from Bitmap
Bitmap bitmap_image = BitmapFactory.decodeResource(context.getResources(), R.drawable.some_id);
NotificationCompat.BigPictureStyle s = new NotificationCompat.BigPictureStyle().bigPicture(bitmap_image);
s.setSummaryText("Summary text appears on expanding the notification");
s.setBigContentTitle("Big Content Title");

mBuilder.setStyle(s);

Notification appear expanded. But after 10 seconds, it contracted.

How I can to manage this time?

Renjith
  • 5,783
  • 9
  • 31
  • 42
Alex
  • 8,908
  • 28
  • 103
  • 157
  • seems like this is default behavior of android os, and there are no legal way to edit this time. according to https://developer.android.com/design/patterns/notifications.html its only says "it is presented to users for a short period of time" – ant Jul 20 '16 at 10:44

0 Answers0