-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Amplify doesn't display custom icons for Push Notifications #11593
Comments
Hello @asmonterroso, Why did you close the Issue? I do have the same problem, did you solved it? Thx in advance! |
Hi @jayjo34, I didn't get help, but I found a solution at https://github.com/aws-amplify/aws-sdk-android/issues/941 check it if it helps you. But there are still problems to customize the icon and sound, I have searched many places and it is very difficult to find support for Amplify |
@asmonterroso thank you! |
Hi @asmonterroso did you find a solution to customize the icon on android ? |
@minotogna , @asmonterroso : I found a temporary workaround, here are the steps I did:
NOTE:
|
Thanks a lot @jayjo34 ! You made my day 😄 I will give it a try next week . but does it mean there’s a bug from amplify side ? In case we should then reopen this issue to let find a permanent solution to this ? thank you🌞 |
@minotogna I think it is not a bug, rather a unrecognized feature. Actually, this involves two repos. To create a pull request somebody needs to integrate a possibility to change the notification parameters within React-Native. I currently don't have time to wrap around this PR. But a reopening should be at least useful. |
Thank you @jayjo34 ! I’ll follow this issue . |
I have a solution without change code in node_module eg: this is my ic_launcher.xml
|
Hello @khanhpoeta Can you please explain. In my react-native app i am using "@aws-amplify/rtn-push-notification": "^1.2.31", this and in my android code i already have all launcher icons in mipmap folder. When i get notification it shows android icon only. I want to show my icons in notification. from library |
Before opening, please confirm:
JavaScript Framework
React Native
Amplify APIs
Push Notifications
Amplify Categories
notifications
Environment information
Describe the bug
I have been trying to add a custom icon for Push Notifications in Amplify, but I'm facing some difficulties. I have attempted to add the icon in the drawable-* and minimap-* folders, and I even used the icons generated from the Android Asset Studio (http://romannurik.github.io/AndroidAssetStudio/icons-notification.html#source.type=clipart&source.clipart=ac_unit&source.space.trim=1&source.space.pad=0&name=ic_stat_onesignal_default) to confirm that the issue is not with my icons.
Example: How to Add Default Icons
I followed the guide: https://docs.amplify.aws/lib/push-notifications/getting-started/q/platform/react-native/
In the JSON configuration, I included the following line:
"IconReference": "ic_notification"
However, the custom icon is not being displayed. I also tried passing a URL in ImageIconUrl, but it didn't work either. I have followed various Firebase guides and attempted to include the icon in the AndroidManifest.xml, but the result is always the same: it shows a small Android icon, which I assume is the default one.
Steps to Reproduce:
Actual Behavior:
The Push Notification always shows a small default Android icon.
Additional Information:
Thank you!
Expected behavior
The Push Notification should display the custom icon specified in the configuration.
Reproduction steps
Code Snippet
// Put your code below this line.
Log output
aws-exports.js
Manual configuration
No response
Additional configuration
Add for support:
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
The first icon:
The text was updated successfully, but these errors were encountered: