-
Notifications
You must be signed in to change notification settings - Fork 283
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
Push notification icon missing (showing white box instead of app icon) in notification tray in Android 12 (SDK 32) #214
Comments
+1 noticing the same issue |
Same here. |
any Update on this? |
I face the same issue with few devices on Android 11 + versions. I only see a box instead of the notification icon. |
Workaround: To create a notification icon set from Android Studio with a transparent background, follow these steps: Open Android Studio and go to the "res" folder in your project's directory.
Make sure that you've defined the icon background color in your colors.xml file as follows:
|
Hi @vishal-revdiwala, Thanks for your response. To have the notification icon showing correctly the png should be an icon which is transparent + white color and put it in as drawable/notification_icon.png? - This I am asking because after following your steps, I get the image as a white png. |
Hi @NityaSantosh26, just give it a try as I mentioned in the earlier comment. I also tried what you said, but it didn't work for me. After a couple of attempts, this method worked for me. Is the icon type set as "Notification Icons" under the "Image Asset"? Yes. |
Hey @vishal-revdiwala, I have tried the way you've suggested but I don't get the icon and icon color and in the debug logs I see I've added the meta-data tags you've suggested but under application in AndroidManifest.xml but I don't see any difference. |
This works for me: I have a PNG with alpha channel.
Then on the plugin (javascript side) set to the name without file extension:
|
Bug Report
Push notification icon missing (showing white box instead of app icon) in notification tray in Android 12 (SDK 32)
Expected Behaviour
Should show app icon instead of white box
Actual Behaviour
notification icon missing and shows white box
Reproduce Scenario (including but not limited to)
Keep app in background and trigger one push notification to device.
Steps to Reproduce
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
Android 12
(Android) Device Vendor (e.g. Samsung, HTC, Sony...)
Samsung, Redmi
cordova info
PrintoutCordova Packages:
Project Installed Platforms:
Project Installed Plugins:
Environment:
android Environment:
ERROR: Command failed with ENOENT: avdmanager list target
spawn avdmanager ENOENT
ios Environment:
Xcode 14.2
Build version 14C18
Sample Push Data Payload
Sample Code that illustrates the problem
Logs taken while reproducing problem
The text was updated successfully, but these errors were encountered: