react-native-fcm icon indicating copy to clipboard operation
react-native-fcm copied to clipboard

custom icon is not being used.

Open cjmling opened this issue 10 years ago • 12 comments

I did used white icon with transparent background but still. I posted/explained issue here http://stackoverflow.com/questions/39116266/fcm-notification-icon-is-not-being-used

What could be the possible mistake I am making ?

Thanks

cjmling avatar Aug 30 '16 06:08 cjmling

I'm currently running into this as well. It's not an issue with this package.

If you're using the Firebase Console, the icon parameter doesn't seem to work. See this Stack Overflow issue: http://stackoverflow.com/questions/37325051/notification-icon-with-the-new-firebase-cloud-messaging-system

dslounge avatar Aug 30 '16 07:08 dslounge

Try this code: http://stackoverflow.com/questions/39207009/firebase-notification-console-equivalent-in-nodejs

you should set the icon inside notification payload

sibelius avatar Aug 30 '16 11:08 sibelius

Thanks , I will try sending the notification through script (not the firebase console) and will update.

cjmling avatar Aug 30 '16 12:08 cjmling

I tried using curl and it still didn't work. :( .. Did receive the notification but the icon is still white.

curl -X POST --header "Authorization: key=SERVER-KEY" --Header "Content-Type: application/json" https://fcm.googleapis.com/fcm/send -d "{"to":"RECEPIENT-TOKEN-ID","notification":{"body":"Yellow"} "priority":"10"}"

cjmling avatar Aug 30 '16 13:08 cjmling

u r missing notification: { icon: 'your_icon' }

sibelius avatar Aug 30 '16 13:08 sibelius

@sibelius yup i tried with that too . No luck :S

"notification":{"body":"Yellow" , "icon" : "ic_stat_set" }

cjmling avatar Aug 30 '16 14:08 cjmling

ic_stat_set is inside your app on android?

sibelius avatar Aug 30 '16 14:08 sibelius

Yup , screen shot 2559-08-30 at 9 52 11 pm

cjmling avatar Aug 30 '16 14:08 cjmling

And this is the png. Its white with transparent background. ( ps u might not seeing it. Its below this sentence ) ic_stat_set

Its above this sentence.

cjmling avatar Aug 30 '16 14:08 cjmling

@cjmling you should add your notification icons inside mipmap folders

sibelius avatar Sep 14 '16 18:09 sibelius

@cjmling is issue solved?

evollu avatar Sep 30 '16 21:09 evollu

Solved, thanks

cjmling avatar Sep 30 '16 23:09 cjmling