-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Notification icon problem #426
Comments
Ok but in my ionic application I have to configure something? |
*where notification_icon is the filename of your icon. |
@pablozandona Can I also set the notification icon color from my AndroidManifest.xml? |
@pablozandona I followed your instructions to a tee and it did not work for me |
|
@jskidd3 what exactly didn't work? |
@pablozandona The icon stayed the same. It was a solid grey/white version of the app icon. I eventually managed to get it working by following the instructions found here with cordova-custom-config: #53 (comment) I wish I knew why that fixed it though! |
Don't know if this will help someone in the future or not, but in the instructions above, when it says to replace the notification_icon with the filename of your icon, you need to omit the .png ending in the AndroidManifest.xml file. |
In case it helps anyone in the future, the meta-data tag goes within the application tag in the AndroidManifest.xml file. Like:
|
@lexyfeito Sorry, not an expert on Android development but @drawable is the usual place for images. |
hi @gecko-8, this solution doesnt work for me, i even type the tag manually in manifest and nothing. I dont know what i could be missing |
i also notice in this repo that icons are weir (for a lack of a better term). Are the icons supposed to be on some kind of special format? |
Nope, just a 48x48 png. The alpha channel in the image provides the icon shape.
|
To be totally clear, if you use my above code, make sure the image is 48x48, named notification_icon.png and is located in the platforms/android/res/drawable folder. I have a step in my build script to copy the image there so if I remove the platform it gets put back. To add the above to AndroidManifest.xml I used the cordova-custom-config plugin with the following in the config.xml:
|
In case this happens to anyone else: @gecko-8
I solved it by adding the android namespace at the config.xml's root:
|
This is very useful, working for my issue in oreo+ version. |
I've got this error message when building project in Android platform.
This is my widget And my config file tag: |
Hi, in the documentation is not clear how to change the notification icon in android. In the Notification Bar I would like to see a different icon than the one in the application. Can anyone explain the procedure to do this in detail?
Thank you.
The text was updated successfully, but these errors were encountered: