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

iconColor does not set icon background on Android #146

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

iconColor does not set icon background on Android #146

kwebble opened this issue Sep 16, 2015 · 4 comments

Comments

@kwebble
Copy link

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 setColor does not set icon background on Android iconColor does not set icon background on Android Sep 16, 2015
@kwebble
Copy link
Author

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
Copy link
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.

@macdonst
Copy link
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.

@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
None yet
Development

No branches or pull requests

3 participants