I'm trying for some time to change the default notification icon of OneSignal using Ionic, but until then, to no avail.
I followed the suggested steps in the official Ionic documentation, created the file 030_copy_android_notification_icons
in the <app-root>/hooks/after_prepare
directory, and generated a new build, but the icon continued with the default notification bell.
I tried to make the change in a different way, following the OnseSignal's own documentation , but I get the following errors when I try to run the app on my phone with the command ionic cordova run android --device
:
Toresolvethisproblem,Imanuallycreatedthexml
folderinthe<app-root>/platforms/android/res
directory,butwhenIrunthecommandagainIgetanothererror:
Atthispoint,Ihadtocreatethefoldervalues
andinsideitthefilestrings.xml
andwhenIruntheioniccordovarunandroid--device
commandIgetthefollowingerror:
And from that point I do not know what else to do. I already researched here in Stack Overflow in Portuguese and also in the gringo, but I did not find anything that could help me, because this last error is quite generic.
I've also tried removing the android from the cord and adding it again with the commands ionic cordova platform rm android
and ionic cordova platform add android
.
I also tried to downgrade from version 8.0.0 to 7.1.0, and nothing.
Note: Despite the [OK] Your app has been deployed.
message, the application is not installed on the phone. If I remove the folder <app-root>/platforms/android/res
everything works normally, but without the icon I need to insert in the notifications.