awesome_notifications
awesome_notifications copied to clipboard
App Icon Not Visible in Release mode.
I have tried initialized AwesomeNotifications by keeping the icon null and by providing the resource path as well, but both times, the app icon is not displayed in the notification. I am using a progress_bar which is listening to a websocket. It is working completely fine except for the logo as shown in the image attached. The logo is not being displayed, instead of that, a container is shown.
I have added these lines to my AndroidManifest.xml file as well:
<activity>..... .... android:showWhenLocked="true" android:turnScreenOn="true">
The logo is only visible in debug mode on Oppo and Vivo mobile phones only. Please help.
did you resolve this issue?
No I didn't.
On Wed, Jun 30, 2021, 5:21 PM Himanshu Dhakecha @.***> wrote:
did you resolve this issue?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rafaelsetragni/awesome_notifications/issues/208#issuecomment-871336487, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANIAA2B5YKIPZ2JD4QP4H73TVMANBANCNFSM4652H62Q .
Ok, Let me tell you how I managed this.
according to these answers : https://stackoverflow.com/questions/45318614/why-is-my-smallicon-for-notifications-always-greyed-out
Many devices won't support colour icon. You have to make silhouette icon for you logo. It will be single coloured icon. And give the icon path in Awesome notification like
AwesomeNotifications().initialize( // set the icon to null if you want to use the default app icon 'resource://mipmap/ic_stat_ic_notification',
and in your android manifest.xml as well like
and you will start seeing the icon in every device.
Note that still some devices will show the colourful logo icons. But now it's according to device type and resolution, but now you will see the icon at least in every phones.
@him123 : could you please specify what you have in the manifest.xml? Seems that part of the reply was cut off. Thanks! Bence
I also had the same issue, and finally managed to fix it by adding a keep.xml. I had the icon in a drawable resource folder and also the issue that the icon was blank in release mode. How to fix it:
- Create a folder called "raw" under android/app/src/main/res
- Create a keep.xml file and add the following content:
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools"
tools:keep="@drawable/*,@raw/slow_spring_board" />
Save it and rebuild.
Not sure if the AndroidManifest.XML change was also neccessary, I kept it there, but without the keep.xml, I still had the issue even after the AndroidManifest.XML change.
I also had the same issue, and finally managed to fix it by adding a keep.xml. I had the icon in a drawable resource folder and also the issue that the icon was blank in release mode. How to fix it:
- Create a folder called "raw" under android/app/src/main/res
- Create a keep.xml file and add the following content:
<?xml version="1.0" encoding="utf-8"?> <resources xmlns:tools="http://schemas.android.com/tools" tools:keep="@drawable/*,@raw/slow_spring_board" />
Save it and rebuild.
Not sure if the AndroidManifest.XML change was also neccessary, I kept it there, but without the keep.xml, I still had the issue even after the AndroidManifest.XML change.
this worked for me as well, i did not change anything in AndroidManifest.xml
Hi! Sorry for taking so long to respond to your issue on GitHub. I was focused on releasing the new 0.7.0 version of awesome_notifications
and awesome_notifications_fcm
and i didn't had time enough to do both. But now I can answer all your questions.
So now i'm asking you to recreate this topic using the new issue template. There's a lot of missing informations that i need to understand your problem, and all the instructions are already in the new issue template. Also, remember to check beforehand if your issue was posted by another user.
So I will automatically close all previous issues so far. Sorry for the inconvenience and i will be waiting for your new issue request.
Thank you so much for your support!