private static void createInboxNotification( Context ctx, Account account, List<NotificationEntity> entities, boolean feedback) { NotificationEntity lastEntity = entities.get(entities.size() - 1); NotificationCompat.Builder builder = createNotificationBuilder(ctx, account, lastEntity, feedback); NotificationCompat.InboxStyle style = new NotificationCompat.InboxStyle() .setBigContentTitle(lastEntity.mNotification.subject) .setSummaryText(getNotificationSubText(account)); for (NotificationEntity entity : entities) { style.addLine(getContentMessage(ctx, entity, false, true)); } builder.setStyle(style) .setNumber(entities.size()) .setGroup(NOTIFICATION_KEY_GROUP + account.getAccountHash()); publishNotification(ctx, builder.build(), lastEntity.mGroupId); }
@TargetApi(Build.VERSION_CODES.N) private static void createSummaryGroupNotification( Context ctx, Account account, Set<String> notifications, boolean feedback) { int notificationId = FowlerNollVo.fnv1_32(account.getAccountHash().getBytes()).intValue(); NotificationCompat.Builder builder = new NotificationCompat.Builder(ctx, account.getAccountHash()) .setContentTitle(getNotificationSubText(account)) .setSubText(getNotificationSubText(account)) .setSmallIcon(R.drawable.ic_stat_notify) .setAutoCancel(true) .setCategory(NotificationCompat.CATEGORY_SOCIAL) .setPriority(NotificationCompat.PRIORITY_DEFAULT) .setDefaults(feedback ? NotificationCompat.DEFAULT_ALL : 0) .setColor(ContextCompat.getColor(ctx, R.color.primaryDark)) .setContentIntent( getViewAccountChangesPendingIntent(ctx, account, notificationId)) .setDeleteIntent( getDeleteAccountNotificationPendingIntent(ctx, account, notificationId)) .setOnlyAlertOnce(true) .setVisibility(NotificationCompat.VISIBILITY_PUBLIC); NotificationCompat.InboxStyle style = new NotificationCompat.InboxStyle() .setSummaryText(getNotificationSubText(account)); builder.setStyle(style) .setNumber(notifications.size()) .setGroupSummary(true) .setGroup(NOTIFICATION_KEY_GROUP + account.getAccountHash()); publishNotification(ctx, builder.build(), notificationId); }
.setSummaryText(inboxStyleEmailAppData.getSummaryText());
.setSummaryText(inboxStyleEmailAppData.getSummaryText());
TorrentEngine.getInstance().tasksCount())); inboxStyle.setSummaryText((isNetworkOnline ? getString(R.string.network_online) : getString(R.string.network_offline)));