Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Android Blank Notification Icon #349

Closed
ryanpager opened this issue Nov 17, 2015 · 11 comments
Closed

Android Blank Notification Icon #349

ryanpager opened this issue Nov 17, 2015 · 11 comments
Labels

Comments

@ryanpager
Copy link

When I receive a notification on Android, the icon showing up is always blank. I am registering as follows,

Version: 1.3.0

settings =
      android:
        senderID: ###
      ios:
        alert: yes
        badge: yes
        sound: yes

The res folder in the android platform has all of the correct icons, so im a little stumped as to why they aren't showing up. The icon I get instead is a grey circle, with a white circle inside of it. I've even tried adding the 'icon' configuration attribute in there, and it doesn't work...

Really strange...any ideas?

@ryanpager
Copy link
Author

Just figured it out -- my AndroidManifest had:

android:targetSdkVersion="22"

When I changed it to 20 it started working. I'll leave this open since this might be a bug?

@macdonst
Copy link
Member

@ryanpager
Copy link
Author

@macdonst Where in that document does that describe anything to do with the targetSdKVersion? Ive read the documentation at least 5 different times.

@macdonst
Copy link
Member

@ryanpager you shouldn't try and fight the new normal in Android. You are better off following their icon guidelines which I link to.

@SandroGrzicic
Copy link
Contributor

Can confirm, setting the icon with the "icon" property doesn't work with targetSdkVersion set to 22 (shows a blank image), but works perfectly (shows our png icon) with it being set to 20. Hopefully this doesn't break anything in our app.

@macdonst
Copy link
Member

OMG guys, this is driving me crazy. This is an Android OS change. When you see the blank image that is expected behaviour in Android 22 and later. The OS will take your icon replace all non transparent pixels with the color white. So if you have an icon with no transparent pixels it will look like a white square. Read the guidelines I link to above.

@bau720123
Copy link

hello guys
@macdonst and @fredgalvao have already do enough Explanation for us
see these
#345
#348

the 348 told us the clear logical
because when I changing android:targetSdkVersion="20"
problem solved

Although I think,the Android official in Android 22 and above let icon replace all non transparent pixels with the color white,is a crazy behavior (I mean I don't like it),if somebody know why Android official will do this change ? (Material Design ? or...)

@macdonst
Copy link
Member

@bau720123 Yes, it was done for material design.

@bau720123
Copy link

thanks @macdonst
hope Material Design will disappear as soon as possible (maybe Android 7) (just kidding...XD)

@adyz
Copy link

adyz commented Nov 27, 2015

On some devices I get the icon, on some don't. :(

@lock
Copy link

lock bot commented Jun 5, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

5 participants