you can disable the badges per channel eg. with mChannel.
setShowBadge(false)
Sets whether notifications posted to this channel can appear as application icon badges in a Launcher. Only modifiable before the channel is submitted to NotificationManager.createNotificationChannel(NotificationChannel).
... when having having assigned some channelId
to the NotificationChannel.
methods setGroup()
/ getGroup()
and canShowBadge()
also appear relevant.
therefore you'd have to define channels per launcher (or at least two, in order to have at least one channel which shows no badges) - then you can disable the badges for some of them, depending into which channel the notifications are being sent.
there also is NotificationCompat.Builder(Context context, String channelId)
method .setShortcutId (String shortcutId):
If this notification is duplicative of a Launcher shortcut, sets the id of the shortcut, in case the Launcher wants to hide the shortcut.
LauncherApps can provide access to these shortcuts;
and one can at least get the badge icon from ShortcutInfo.
there's android.intent.action.BADGE_COUNT_UPDATE
for stock Android Oreo.
currently, only the Sony launcher would permit defining the Activity with com.sonyericsson.home.intent.extra.badge.ACTIVITY_NAME
.