cordova-plugin-local-notifications
cordova-plugin-local-notifications copied to clipboard
SmallIcon don't work
WARNING: IF YOU IGNORE THIS TEMPLATE, WE'LL IGNORE YOUR ISSUE. YOU MUST FILL THIS IN!
Provide a general summary of the issue.
Your Environment
Ionic:
ionic (Ionic CLI) : 4.1.1 Ionic Framework : ionic-angular 3.9.2 @ionic/app-scripts : 3.1.11
Cordova:
cordova (Cordova CLI) : 8.0.0 Cordova Platforms : android 7.1.0 Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.2, cordova-plugin-ionic-webview 1.2.1, (and 13 other plugins)
cordova-plugin-local-notification 0.9.0-beta.2 "LocalNotification"
Expected Behavior
I put the icon in MyApplication/resources/iconnotificacao.png and do in my code:
this.localNotifications.schedule({ id: i+1, text: 'Produto: ' + res.data.notificar.perguntas[i].produto.substring(0,20) + '...', title: 'Nova pergunta, conta: ' + res.data.notificar.perguntas[i].conta, icon: 'https://image.ibb.co/gnUHn9/Iconnotificacao.png', smallIcon: 'res://iconnotificacao', priority: 2,
but the small icon don't work.
What were you trying to do?
setting a small icon in local notification
There is numerous help in the issues list on small icons. Suggest you read them and follow the instructions.
@veronesecoms
- Goto /platforms/android/app/src/main/res/mipmap-hdpi
- add icon 48x48 and name it n_icon.png (white version with transparency)
- add smallIcon: 'res://n_icon.png'
@veronesecoms
- Goto /platforms/android/app/src/main/res/mipmap-hdpi
- add icon 48x48 and name it n_icon.png (white version with transparency)
- add smallIcon: 'res://n_icon.png'
@djpero Well thanks for this, placing the image 48 x 48 in /platforms/android/app/src/main/res/mipmap-hdpi
worked for me but with smallIcon: 'n_icon'
.
What does not worked?
smallIcon: 'res://n_icon.png'
or smallIcon: 'res://n_icon'
or smallIcon: 'n_icon.png'
does not worked.
Checked in Android Pie, Oreo and Marshmallow devices.
any other ideas? it does not work for me.
Property "smallIcon" must be of kind res://...
I use this plugin with meteor, icon property works, but smallIcon not. i'm trying multipley syntax like @sarvap-praharanayuthan
edit This works for me #1627
Thanks, @djpero , works!!