0

What I try to achieve is a notification like #2 ("USB debugging connected"):
shown with title and description on separate lines.

However, when I creata a notification channel with
NotificationChannel(channelId, channelName, NotificationManager.IMPORTANCE_MIN) it will be shown as notification #3 - collapsed with the title on the same line - regardless of the priority of the notification itself (priority = NotificationCompat.PRIORITY_MIN or priority = NotificationCompat.PRIORITY_HIGH)

If the channel importance in increased to LOW
NotificationChannel(channelId, channelName, NotificationManager.IMPORTANCE_LOW) or above the notification is shown like a normal notification #1 ("Syncthing is running")

How to show an expanded silent notification? I also tried setting other options like setSound(null, null) etc. but they didn't work either.

enter image description here

Tobias
  • 7,282
  • 6
  • 63
  • 85

1 Answers1

0

Probably you mean style of Notification?

NotificationCompat.Builder builder;
....
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
        builder.setStyle(new NotificationCompat.BigTextStyle());
AlexS
  • 918
  • 1
  • 12
  • 28