这个不是 im 侧控制的,是系统控制的。
发送通知时,可以设置一个 Number 参数,然后系统会在当前角标数字的基础上加上这个 number 值;如果没设置的话,会加 1
NotificationCompat.Builder builder = new NotificationCompat.Builder(context, wfcNotificationChannelId)
.setSmallIcon(R.mipmap.ic_launcher_notification)
.setAutoCancel(true)
.setNumber(number) // 角标会加上这个值
.setCategory(CATEGORY_MESSAGE)
.setSound(notificationRingUri)
.setPriority(NotificationCompat.PRIORITY_HIGH)
.setDefaults(DEFAULT_ALL);
builder.setContentIntent(pendingIntent);
builder.setContentTitle(title);
builder.setContentText(content);