androidflutterdartnotificationsonesignal

Flutter oneSignal notifications icon not set


I'm using one signal within my flutter app and everything is fine except the notifications have no icon ( comes with a default bill icon ).

I have read the documentation for one signal and generated an AssetsImage by Android Studio in PROJECT/android/res/ with name ic_stat_onesignal_default

Then I built the app using the command flutter run --release on a real device and still, the notification comes with default bill icon instead of my app icon!!

Is there some code required in the AndroidManifest.xml file too?


Solution

  • use these tool and upload image that is trnasperts http://romannurik.github.io/AndroidAssetStudio/icons-notification.html#source.type=image&source.space.trim=1&source.space.pad=0&name=ic_stat_onesignal_default

    for onesignal the folders names is drawable-xxxx so you just download from the tool and extract inside the android\app\src\main\res

    Note :- Starting with Android 5, the OS forces Small Notification Icons to be all white when your app targets Android API 21+. If you don't make a correct icon, it will most likely be displayed as a bell or solid white icon in the status bar.