Android Question Change color of Notification Icon/text

Alexander Stolte

Expert
Licensed User
Longtime User
Hello,

I have noticed where I added my white icon, which one does not see when pulling down the message, but I noticed that all other notifications from other apps then have a different icon color. Even the B4A Bridge changes its color. How can I do that?
 

DonManfred

Expert
Licensed User
Longtime User
Starting from Android 6 or so the Icons in the notificationbar are all white.

Maybe you mean the transparency and a colored navigationbar (due to the transparency the icons apppear in a other color)?

Amazon Echo App. Defaultnavbar (Black)
alexa.png

VLC Media Player (colored Navbar)
vlc.png

If it is this what you are searching for then i suggest to go over the AppCompat tutorials.
 
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
22 and test it again (if doesn't work then set it to 23
hmm, the logo is white if i scroll down.

here my code:
B4X:
Sub fm_MessageArrived (Message As RemoteMessage)
    Log("Message arrived")
    Log($"Message data: ${Message.GetData}"$)
    mess =  Message.GetData.Get("body")
    Dim n As Notification
    n.Initialize
   
'    n.SetInfo(Message.GetData.Get("title"), Message.GetData.Get("body"), Main)
    n.SetInfo2(Message.GetData.Get("title"), Message.GetData.Get("body"),"3", Main)
    n.Icon = "icon"
    n.Light = True
Log(Message.From)
    n.Notify(1)
   
End Sub
 
Upvote 0
Top