4

I read that is possible to use a transparent color to "hide" the smallIcon but there's a gap between icons.

Also I need to disable the notification badge; I just need the sound and the notification on the lock-screen(visibility =1) and the notification on the top notification bar.

E_Blue
  • 1,021
  • 1
  • 20
  • 45
  • 3
    So many touchy people. So many animosity. Instead of putting negatives explain what I'm doing wrong so I can learn; or I will keep making the same mistake over and over. – E_Blue Dec 04 '18 at 04:42

1 Answers1

10

To disable Notification badge you can use setShowBadge(false) on your NotificationChannel object.

Checkout more Modify a Notification Badge.

The other part of i.e removing small icon . AFAIK its not possible since its a mandatory in place of large icon. Although I am not completely sure about it . As a work around you can use a small icon with transparent background.

ADM
  • 20,406
  • 11
  • 52
  • 83
  • I have a transparent icon now but if the user have another small icons from anothers apps it shows a missing icon, a gap in the notification bar. Also, now, and thanks to you, I just changed my code to setShowBadge(false) but I will know if it worked tomorrow when I get a phone with true Android Oreo since mine have Android Oreo Go that for some reason doesn't show any badges. – E_Blue Dec 04 '18 at 04:38
  • Well I am not sure what gap you are taking about . 0adding a image with question might helpful . I have found a [`Thread`](https://stackoverflow.com/questions/30887078/notificationcompat-android-how-to-show-only-large-icon-without-small) discussing the same . Please have a look . – ADM Dec 04 '18 at 05:04
  • I mean I get icon icon icon empty space icon icon.... .The other icons are from another Apps – E_Blue Dec 04 '18 at 05:34