Skip to content
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

ic_notification under res still renders as white circle #502

Closed
shrutic opened this issue Aug 3, 2017 · 4 comments
Closed

ic_notification under res still renders as white circle #502

shrutic opened this issue Aug 3, 2017 · 4 comments
Labels

Comments

@shrutic
Copy link

shrutic commented Aug 3, 2017

I have talked to my designer and got the android notification icons and saved them under the res\mipmap-*****\ folders as ic_notification.png.

I have ensured that my designer is aware of all the requirements of the transparent background and used the icon sizes specified in

/android/app/src/main/res/mipmap-mdpi/ic_notification.png - 24x24
/android/app/src/main/res/mipmap-hdpi/ic_notification.png - 36x36
/android/app/src/main/res/mipmap-xhdpi/ic_notification.png - 48x48
/android/app/src/main/res/mipmap-xxhdpi/ic_notification.png - 72x72
/android/app/src/main/res/mipmap-xxxhdpi/ic_notification.png - 96x96

But still I get the white circle associated with my icon ( circle because my ic_launcher.png is a circle shape icon).

What am I missing here? Appreciate any thoughts.

@PaitoAnderson
Copy link

PaitoAnderson commented Aug 22, 2017

Same issue here.. I tested this and it displayed the correct icon for local notifications.

PushNotification.localNotification({
    message: 'Test Message',
    smallIcon: 'ic_notification',
});

Resolved: My issue was because I was using FCM and sending the title, body from the server in the Notification property instead of just using the Data property and using title, message.

@cmiotto
Copy link

cmiotto commented Sep 8, 2017

notification icons should go under
/android/app/src/main/res/drawable-*

this works for me for remote notifications but not for local notifications (still see the white circle), saving ic_notification images both in drawable and mipmap works for me.

@rahulworld
Copy link

You have to follow some rules for notification icon link.
First, generate notification icons link of all sizes. and put the icon name ic_notification.
Then use put all sizes ic_notification in respective folder in resource mipmap folder and add line in AndroidManifest.xml file.
<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@mipmap/ic_notification" />

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants