smallIcon of the local notification does not appear IONIC

1

I need to change the smallIcon of my local notification, but I have already defined the location in my resources but it still does not appear.

I tried something like:

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,

My notification icon is located at:

ProjectDate / resources / iconnotification.png

Ionic / Cordova Information:

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)
    
asked by anonymous 17.09.2018 / 15:18

1 answer

0

The LocalNotification smallicon has to have the correct file extension (.jpg, or .png, etc.).

Test like this:

smallIcon: 'res://iconnotificacao.png'

Replace with the extension of your file.

    
09.10.2018 / 14:57