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

NOTIFICATION ICON MISSING:[White Box is shown inside a grey circle][TRIED IN MARSHMALLOW,LOLLIPOP ] #84

Closed
rimzici opened this Issue Aug 24, 2016 · 11 comments

Comments

Projects
None yet
6 participants
@rimzici
Copy link

rimzici commented Aug 24, 2016

Using :

"react": "^15.2.1",
"react-native": "^0.31.0",
"react-native-fcm": "^1.0.16",

From the server side tried sending icon as
icon : ‘ic_launcher’
and
icon : '@mipmap/ic_launcher',

in my react-native project i have my app icon inside

/project/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png

i also tried putting icon in root res folder as

/project/android/app/src/main/res/ic_launcher.png

RESULT :
A white Box is shown in the notification tray with title, when i receive notification.
But if i lock my device screen and there i can see my app icon with title displayed for the same push notification.
Need Assistance.
Thanks in Advance.

@rimzici rimzici changed the title NOTIFICATION ICON MISSING:[White Box is shown inside a grey circle] NOTIFICATION ICON MISSING:[White Box is shown inside a grey circle][TRIED IN MARSHMALLOW,LOLLIPOP ] Aug 24, 2016

@evollu

This comment has been minimized.

Copy link
Owner

evollu commented Aug 24, 2016

you need to use a white icon. check bottom of readme

@rimzici

This comment has been minimized.

Copy link
Author

rimzici commented Aug 25, 2016

My mistake. Pardon.
thanks @evollu

@evollu evollu closed this Aug 31, 2016

@saurabh-sablok

This comment has been minimized.

Copy link

saurabh-sablok commented Nov 30, 2016

HI evollu,

Can u help me to solve the same issue,
white box is showing, when app is in background

@evollu

This comment has been minimized.

Copy link
Owner

evollu commented Dec 1, 2016

you need to provide a notification icon with white content and transparent background. check https://github.com/evollu/react-native-fcm/tree/master/Examples/simple-fcm-client/android/app/src/main/res

@saurabh-sablok

This comment has been minimized.

Copy link

saurabh-sablok commented Dec 2, 2016

Thanks evollu.
can we keep two different icon for each ie one for launcher and other for notification?
or can we send notification icon via FCM console?

@evollu

This comment has been minimized.

Copy link
Owner

evollu commented Dec 2, 2016

yes. check that folder again, you will see icon files for notification
then in your notification payload you need to add
"icon": "ic_notif"

@giordy

This comment has been minimized.

Copy link

giordy commented Apr 19, 2017

In my case I was not getting the icon even after inserting

"icon": "ic_notif"

in the notification payload. I solved by adding

<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@mipmap/ic_notif"/>

in AndroidManifest.xml (within the <application> tag).

I hope it can be useful to someone.

@amit-springct

This comment has been minimized.

Copy link

amit-springct commented Oct 10, 2017

Thanks @giordy . Adding meta-data worked for me. I didn't need to add 'icon' in the payload.

@ggepenyan

This comment has been minimized.

Copy link

ggepenyan commented Oct 12, 2017

hi everyone,, @evollu, I need to show notification in lock screen. Any help please

@evollu

This comment has been minimized.

Copy link
Owner

evollu commented Oct 12, 2017

@ggepenyan isn't it a phone setting? it shows up by default?

@ggepenyan

This comment has been minimized.

Copy link

ggepenyan commented Oct 20, 2017

ok, thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment