Android Question Notifications icons colors

Discussion in 'Android Questions' started by LucaMs, Apr 8, 2018.

  1. LucaMs

    LucaMs Expert Licensed User

    I don't know how I have to create the icon.

    I can see it (white) in the status bar but not in the list of notifications.

    Can you upload an example?


    Thank you.



    P.S. SDK target 23 - device: Android 4.4.2.
    I'm not so sure that the problem is the "format" of the image file (png, of course), given that the icon is shown on the status bar.
     
    Last edited: Apr 8, 2018
  2. LucaMs

    LucaMs Expert Licensed User

    It is a problem with Android 4.4.2, since on a device with Android 7 all it's ok.
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    Changes in API level 22 (Android 5+) will not affect the behavior of Android 4.4 devices.
     
  4. LucaMs

    LucaMs Expert Licensed User

    Yes but I can see notifications' icons of other apps in the notifications list (4.4.2) but not mine.

    [It is just a test so I start the notification directly from the Main Activity]

    Code:
    Dim n As Notification
        n.Initialize
        n.Icon = 
    "prova"
        n.SetInfo(
    "This is the title""and this is the body.", Me) 'Change Main to "" if this code is in the main module.
        n.Notify(1)
    [You can see a known comment ;)]
     
  5. Semen Matusovskiy

    Semen Matusovskiy Well-Known Member Licensed User

    Use NotificationBuider (LargeIcon).
     
    LucaMs likes this.
  6. LucaMs

    LucaMs Expert Licensed User

    I will try, thank you.
     
  7. LucaMs

    LucaMs Expert Licensed User

    It's ok (icon shown both on notifications bar and in the notifications list) on Android 7 and 4.0.4; on Android 4.4.2 I can see the icon only on the notifications bar.
     
  8. LucaMs

    LucaMs Expert Licensed User

    Tried NB6 - same thing, icon not shown in the notification list :eek:

    Android 4.4.2 is damned :p
     
  9. LucaMs

    LucaMs Expert Licensed User

    Thinking "better"...

    Something does not works, since I can see icons, white but also colored, of other apps.
     
  10. Erel

    Erel Administrator Staff Member Licensed User

    NB6 used the same Notification object for Android 5-. The behavior will be exactly the same.

    You need to use barx's NotificationBuilder for this.
     
    Peter Simpson likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice