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

Android: iconColor doesn't work in hexadecimal (#RRGGBB) format #480

Closed
javiercr opened this issue Jan 7, 2016 · 4 comments
Closed

Android: iconColor doesn't work in hexadecimal (#RRGGBB) format #480

javiercr opened this issue Jan 7, 2016 · 4 comments

Comments

@javiercr
Copy link

javiercr commented Jan 7, 2016

Despite of what the docs says about android.iconColor, I cannot use colors in #RRGGBB format.

This config won't display the proper background color (will display the default grey instead):

config = {
  android: {
    senderID: GCM_SENDER_ID,
    iconColor: "#544A44"
  }
};

$cordovaPushV5.initialize(config)

However, it works with iconColor: "#FF544A44" (i.e. with the #AARRGGBB format).

Also, for reasons I cannot understand, the #RRGGBB format it does work when using black color ( iconColor: "#000000").

Maybe the best option is to just recommend in the docs to use the #AARRGGBB format.

@macdonst
Copy link
Member

macdonst commented Jan 7, 2016

@javiercr I'll give it a try with your value but according to the Android docs the method we use should support #rrggbb and #aarrggbb strings.

http://developer.android.com/reference/android/graphics/Color.html#parseColor(java.lang.String)

@macdonst
Copy link
Member

macdonst commented Jan 7, 2016

@javiercr working fine for me. Can you give me an example payload you are sending to GCM?

@javiercr
Copy link
Author

javiercr commented Jan 7, 2016

@macdonst, I've tested it again and now it works with #544A44. Very weird... Closing this, sorry for bothering you.

@javiercr javiercr closed this as completed Jan 7, 2016
@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.
Development

No branches or pull requests

2 participants