New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iconColor does not set icon background on Android #146

Closed
kwebble opened this Issue Sep 16, 2015 · 4 comments

Comments

Projects
None yet
3 participants
@kwebble

kwebble commented Sep 16, 2015

To set the background color for the notification icon on Android I have set iconColor like this:

var push = PushNotification.init(
               { android: { senderID: api.gcmSenderId
                          , iconColor: 'red'
                          }
               , ios:     {}
               , windows: {}
               })

I have tried color values like 'red', 'blue' and #RRGGBB values, but in a notification the result is always the default gray color.

Is there something else required to set the background color of the icon?

I'm using version 1.2.3 of PushPlugin with Cordova 5.1.1.

@kwebble kwebble changed the title from setColor does not set icon background on Android to iconColor does not set icon background on Android Sep 16, 2015

@kwebble

This comment has been minimized.

Show comment
Hide comment
@kwebble

kwebble Sep 16, 2015

Perhaps, I'm not 100% sure, this only sets the color once, when registering.

I changed the software that creates the notifications to include a color property with each notification.

kwebble commented Sep 16, 2015

Perhaps, I'm not 100% sure, this only sets the color once, when registering.

I changed the software that creates the notifications to include a color property with each notification.

@fredgalvao

This comment has been minimized.

Show comment
Hide comment
@fredgalvao

fredgalvao Sep 16, 2015

Collaborator

FYI, the iconColor only applies to android Lollipop (5.0, sdk=21) and newer. Older versions will use their default theme for notifications unless you create it yourself.

Collaborator

fredgalvao commented Sep 16, 2015

FYI, the iconColor only applies to android Lollipop (5.0, sdk=21) and newer. Older versions will use their default theme for notifications unless you create it yourself.

@macdonst

This comment has been minimized.

Show comment
Hide comment
@macdonst

macdonst Sep 17, 2015

Member

@kwebble Yeah, this will only set the background color on Android 5.0 and greater. I'll update the README to make it more explicit.

Member

macdonst commented Sep 17, 2015

@kwebble Yeah, this will only set the background color on Android 5.0 and greater. I'll update the README to make it more explicit.

@lock

This comment has been minimized.

Show comment
Hide comment
@lock

lock bot Jun 5, 2018

This thread has been automatically locked.

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.