Onesignal-flutter-sdk: No app icon in push notification on Android

Created on 3 Jun 2020  路  8Comments  路  Source: OneSignal/OneSignal-Flutter-SDK

On android there's no app icon in push notifications, while on IOS there is.

I'm using flutter_launcher_icons to automatically generate icons in all sizes for me.
https://pub.dev/packages/flutter_launcher_icons

After taking a look at OneSignal's documentation on Android Notification Icons, it seems flutter_launcher_icons is not generating the sizes 36x36 and 24x24 for android, and that might be the reason why the app icon doesn't appear in the push notifications.

https://documentation.onesignal.com/docs/customize-notification-icons#how-to-add-default-icons

On the other hand, those sizes are not generated on IOS either, although there are a few smaller sizes that are somewhat close to those.

Should I generate an app launcher icon from scratch manually just to add those sizes? (if that's even what it's all about)
If so, how?

Has anyone ever noticed / experienced that issue? How did you solve it?

Android Help Wanted

All 8 comments

Yes me too, and I opened an issue about it and get closed for duplication with yours! but still, no response with the one signal team like is there a workaround for it?

Howdy,
Yes. Please make sure the icons are the correct size and try again. For iOS it may work fine because it may be a bit more flexible.

Howdy,
Yes. Please make sure the icons are the correct size and try again. For iOS it may work fine because it may be a bit more flexible.

where should I put the above sizes? I have multiple folders with names like mipmap-xxxx!

This is been fixed by using the following tool for generation notifications icon in here, I was having two issues:

  1. android studio create the asset image in folders with a name called mipmap-xxxx which in one signal doc it's called drawable-xxxx ( so as far I know any flutter package about creating assets images won't work as well )
  2. for using the above tool you must to put a transparent background image unless will not work. ( So using the same image that used for app icon/logo usually will not work as mostly it's not has a transparent background )

@heshaShawky
Thank you for your patience and the details provided. I am glad you were able to resolve.

Enjoy!

Hey, @heshaShawky I'm trying this tool AndroidAssetStudio and use my app logo with transparent bg, and try any icon in the list from "Clipart" then put it in the right folders, but still nothing change!
it appears the default icon "bell".

Do you add anything in AndroidManifest or anything else?

Hey, @heshaShawky I'm trying this tool AndroidAssetStudio and use my app logo with transparent bg, and try any icon in the list from "Clipart" then put it in the right folders, but still nothing change!
it appears the default icon "bell".

Do you add anything in AndroidManifest or anything else?

Having the same issue here. Did you solve it?

Hey, @heshaShawky I'm trying this tool AndroidAssetStudio and use my app logo with transparent bg, and try any icon in the list from "Clipart" then put it in the right folders, but still nothing change!
it appears the default icon "bell".
Do you add anything in AndroidManifest or anything else?

Having the same issue here. Did you solve it?

Yup, try this maybe will help
https://github.com/OneSignal/react-native-onesignal/issues/1077#issuecomment-719072348

Was this page helpful?
0 / 5 - 0 ratings