notification icon is blank

Eduard

Active Member
Licensed User
Longtime User
Hi,

I copied some notification icons to source folder\Objects\res\drawable and made them read only.

B4X:
   Dim x As Notification
         x.Initialize
         Dim intent1 As Intent
intent1.Initialize(intent1.ACTION_VIEW,"market://details?id=com.hbwares.wordfeud.free")
         x.SetInfo2("title","txt","",intent1)
         x.Icon="icon"
         x.AutoCancel=False
         x.Sound=True
         x.Vibrate=True
         x.Notify(l.new_notification_nr)
Icon on notification is blank whatever icon I choose. If i specify a icon that doesn't exist, notification isn't shown at all. What am I doing wrong?
 

Disco

Member
Licensed User
Longtime User
I read somewhere that setting the icon and other parameters before calling SetInfo2 can fix this.

B4X:
x.Icon="icon"
x.AutoCancel=False
x.Sound=True
x.Vibrate=True
x.SetInfo2("title","txt","",intent1)
x.Notify(l.new_notification_nr)

Not sure though, I'm still new to b4a :)
 
Upvote 0

Eduard

Active Member
Licensed User
Longtime User
OMG it did! Thanks!

This should be in the documentation or even considered as a bug and fixed .
 
Upvote 0
Top