Android Question Can't show correctly a notification icon

marcick

Well-Known Member
Licensed User
Longtime User
Hi all,
I have this piece of code to show a notification:

B4X:
    Dim n As Notification
    n.Initialize
    n.SetInfo("Bmap4AK", "Nuovo SMS", SMS_Manager)
    n.Icon = "sms"
    n.Sound=False
    n.Vibrate=False
    n.Light=False
    n.Notify(9)

The icon is "sms.png", it is in the object/res/drawable folder and is marked as read only.
When the event is coming, I see correctly the icon in the notification bar, but when I swipe to open the notification list, I see just the name and the icon is all black.
Why this behaviour ?

Attached the icon file and a picture that show the problem.
 

Attachments

  • sms.png
    sms.png
    2.3 KB · Views: 146
  • IMAG0011.jpg
    IMAG0011.jpg
    139.6 KB · Views: 168

marcick

Well-Known Member
Licensed User
Longtime User
Yes, I have this trouble since long time and never had time to investigate.
I attach the sample project. Actually I see the problem on two KitKat devices, but I remember it was the same with Android 4.3.
 

Attachments

  • notification test.zip
    6 KB · Views: 162
Upvote 0
Top