I'm currently running into an issue with one of my apps:
- My app has a constant notification for a running service
- On my old phone (Samsung Galaxy S7 Edge) i had a small version of my app icon on the "always on"-display.
- On my new phone (Huawei Mate 20 Pro) there is a small green rectangle instead of an icon
- There is no problem with the "normal" notification bar, the icon is shown properly.
I've already tried to use different methods of creating the notification (e.g. librarys, notification builder etc.), without success.
I tried several icon files, none of them are working - they are all displayed as a green rectangle (on my always-on-display).
They are working absolutly fine everywhere else (notification bar, app drawer, ...).
It's not just ignoring the colors, it's just displaying a green rectangle instead of the icon (see the photo on my first post).
Other icons (e.g. WhatsApp) are displayed fine.
I also tried using a black and white-version, a smaller version and different versions with transparent / intransparent background.
Dim Notif As Notification : Notif.Initialize
Notif.Icon = "icon"
Notif.OnGoingEvent = True
Notif.SetInfo("Luna", "", Main)
Alternative version:
B4X:
Dim smiley As Bitmap = LoadBitmapResize(File.DirAssets, "test.png", 24dip, 24dip, False)
Dim Notif As NB6
Notif.Initialize("default", Application.LabelName, "DEFAULT")
Notif.SmallIcon(smiley)
Dim NotifObj As Notification = Notif.Build("Luna", "", "tag1", Main)
I'm using the default icon in the screenshot (blue icon).
I'm 100% sure it is the green box on my rectangle - i can literally turn it on and off my closing my apps notification.
The Mate 20 Pro has a notch, so it's not always displaying all icons in the upper notification bar - but it's indeed displaying everything on the always-on-display.
I've created a new project with a notification - and now it's a small red line instead of a box.