Description:
I'm trying to change the default notification "bell icon" in the app.
I'm following this guide from Documentation.
Environment
react-native: 0.63.3
react-native-onesignal: 3.9.2
Steps to Reproduce Issue:
ic_stat_onesignal_default.android/app/src/main/res/.small_icon: 'ic_stat_onesignal_default'Nothing works!
And still got the bell icon as a notification icon :)
After added
AndroidManifest.xml
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_stat_onesignal_default" /> // I choose mipmap-xxxhdpi icon size :)
i just was wanted to test if firebase meta-data will work or not and Actually it's work and I got the icon I want!!
have anybody explanation for this!
Edit:
Actually if I set it to com.onesignal.messaging.default_notification_icon will work too.
and you should use the name ic_stat_onesignal_default otherways will not work and will appear the bell default icon.
Possibly wherever you are referencing the android:name from the manifest file, it will tie back to the correct icon regardless of whether you're actually using Firebase. The name/value pair should be all that's important. As long as you have a meta-data tag in the manifest. @thomasciv stackoverflow :)
After added
AndroidManifest.xml<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/ic_stat_onesignal_default" /> // I choose mipmap-xxxhdpi icon size :)i just was wanted to test if firebase meta-data will work or not and Actually it's work and I got the icon I want!!
have anybody explanation for this!Edit:
Actually if I set it tocom.onesignal.messaging.default_notification_iconwill work too.
and you should use the nameic_stat_onesignal_defaultotherways will not work and will appear the bell default icon.Possibly wherever you are referencing the android:name from the manifest file, it will tie back to the correct icon regardless of whether you're actually using Firebase. The name/value pair should be all that's important. As long as you have a meta-data tag in the manifest. @thomasciv stackoverflow :)
Thank You It's Work Form Me 鉂わ笍
I get this error: Resource 'drawable/ic_stat_onesignal_default' not found in Android Manifest.xml:87.
How do you choose the icon? I have many resolutions in different drawable folders. Could this be the problem?
Howdy @areavisuale ,
This seems like a different problem altogether.
Go to android/app/src/main/res/drawable and check if you have a file with name ic_stat_onesignal_default or not. If not, make sure the names match.
Cheers
Hey @rgomezp,
I guess should the documentation to be updated, With this workaround!
Maybe Many users faced the same issue and that's will help them!
@anastely ,
Thanks for the feedback. Can we close this issue then?
Most helpful comment
Thank You It's Work Form Me 鉂わ笍