2

I am developing a simple Android app and I'm trying to build a notification exactly like Google weather looks like on Android Oreo:

  • should be collapsed by default
  • should be grayed out
  • when notification is expanded, the notification subtext should be displayed as content

enter image description here

enter image description here

I had a look on the official Android docs (https://developer.android.com/training/notify-user/expanded#java) but I haven't found exactly what I need.

Is the grayed out notification something specific to system background processes? Can someone please provide a hint regarding this notification style type (especially on the expanded thing)?

Many thanks!

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Lucian Radu
  • 302
  • 1
  • 4
  • 17

1 Answers1

1

What you need to do is create a Notification Channel with its priority set to IMPORTANCE_MIN, then use that channel to create your notification. Check this for more explanation.

Chizoba Ogbonna
  • 161
  • 1
  • 6