Olajide Olaolorun
Olajide Olaolorun

Reputation: 135

Phonegap Build , App icon does not apear

I am updating my currently app. Having problems with getting my app icon to show in notification using the Local Notification plugin. https://github.com/katzer/cordova-plugin-local-notifications/

I have my notification setup as:

    window.plugin.notification.local.schedule({
    id: id,
    ongoing: true,
    autoCancel: false,
    autoClear: false,
    title: "Now Playing:",
    text: title,
    icon: "res://icon.png",
    smallIcon: "res://icon.png",
}); 

I have an icon.png file in the following locations:

/www
/www/img
/www/res

And even tried the icon and smallIcon values without the res:// but it does not seem to work.

I keep getting a default android notification icon, looks like a bell.

Can anyone please help. Thank You.

Upvotes: 2

Views: 369

Answers (1)

Bill K
Bill K

Reputation: 46

Had this problem too. It is due to Phonegap build updating to cli-6.5.0 that happened yesterday. I downgraded to cli-6.0.0 and it worked normally. Simply add this to your config.xml:

<preference name="phonegap-version" value="cli-6.0.0"/>

P.S. Could also work with other versions (for example 6.4.0) but haven't tried it since the above worked.

Upvotes: 3

Related Questions