Как использовать стиль уведомлений Inbox с помощью Android?

Я не знаю, как точно использовать стиль Intification Inbox. Я только что попробовал этот код ниже, и он показывает ошибку в Notification.InboxStyle (). Какую ошибку я сделал? Может кто-нибудь помочь мне с этим вопросом? Вот мой код ..

  private void generateNotification(Context context, String message) {
    System.out.println(message+"++++++++++2");
    int icon = R.drawable.ic_message;
    long when = System.currentTimeMillis();
    NotificationManager notificationManager = (NotificationManager) context
            .getSystemService(Context.NOTIFICATION_SERVICE);
    String title = context.getString(R.string.message_title);
    String subTitle = context.getString(R.string.message_subtitle);
    Intent notificationIntent = new Intent(context, Output.class);
    notificationIntent.putExtra("content", message);
    PendingIntent intent = PendingIntent.getActivity(context, 0,notificationIntent, 0);
    notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP
            | Intent.FLAG_ACTIVITY_SINGLE_TOP);

    Notification base = new Notification.Builder(context)
    .setTicker(message)
    .setSmallIcon(icon)
    .setWhen(when)
    .setContentTitle(title)
    .setContentText(subTitle)
    .setNumber(4)
    .setContentIntent(intent)
    .build();

    Notification notification = new Notification.InboxStyle(base)
    .addLine("First Message")
    .addLine("Second Message")
    .addLine("Third Message")
    .addLine("Fourth Message")
    .setBigContentTitle("Here Your Messages")
    .setSummaryText("+3 more")
    .build();

    //To play the default sound with your notification:
    notification.defaults |= Notification.DEFAULT_SOUND;
    notification.flags |= Notification.FLAG_AUTO_CANCEL;
    notification.defaults |= Notification.DEFAULT_VIBRATE;
    notificationManager.notify(0, notification);



}

Заранее спасибо.

Ответы на вопрос(2)

Ваш ответ на вопрос