If your only problem is that the notification icons display correctly on Android, it worked for me: use the drawable-xhdpi-icon icon (size 96x96 ), rename it icon.png and put it in two places:
- / src / assets / img
- / platforms / Android / res / hood
The drawable folder is a new folder that can be created by copying the platforms / android / res / mipmap -xhdpi to the platforms / android / res / drawable manually or using a hook. In your code, a local or geofence notification is specified as follows:
smallIcon: 'res://icon', icon: 'file://assets/img/icon.png'
If ionic cord resources are part of the problem, you can make your own one-time setup by taking your largest icon and using a resizing tool like resizeimage.net, create a set of icons for iOS and Android. In Excel, here https://github.com/dovk/howto_resources-folder there is a list of sizes and names of the generated .png files. Then you put them in the corresponding resources folder, as I would do with ionic cordova resources - for example, in resources / android / icon, resources / ios / splash , etc. If you do, then the ionic cordova platform add android or the addios ionic cordova platform should no longer be used, as it also means the resources of the ionic cordova > - What you need to do is the cordova add platform (without the ionic at the beginning).
source share