Seit Android 4.1 (API-Ebene 16) ist es möglich, eine Benachrichtigung priority
anzugeben. Wenn Sie dieses Flag auf PRIORITY_MIN
setzen, wird das Benachrichtigungssymbol nicht in der Statusleiste angezeigt.
notification.priority = Notification.PRIORITY_MIN;
Oder im Fall, dass Sie ein Notification.Builder
:
builder.setPriority(Notification.PRIORITY_MIN);
Ab Android 8.0 Oreo (API-Ebene 26) haben Sie die importance
der Mitteilung des NotificationChannel
-IMPORTANCE_MIN
einzustellen:
NotificationChannel channel =
new NotificationChannel(channelId, channelName, NotificationManager.IMPORTANCE_MIN);
notificationManager.createNotificationChannel(channel);
...
builder.setChannelId(channel.getId())
Verwendung transparentes Bild dann .. –
set icon = 'null' – MAC
Sie meinen Sie nur den Benachrichtigungstext oder nichts wollen überhaupt in der Benachrichtigungsleiste, aber nur, wenn Sie es nach unten ziehen? – Alabhya