Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

icon and smallicon not working #1209

Closed
iamola opened this issue Feb 7, 2017 · 13 comments
Closed

icon and smallicon not working #1209

iamola opened this issue Feb 7, 2017 · 13 comments

Comments

@iamola
Copy link

iamola commented Feb 7, 2017

I am using Phonegap Build with version 0.8.4 of this plugin from NPM.
I added:

icon: "file://img/icon.png", smallIcon: "file://img/icon.png",

But i still get the default Android bell icon for my app. Even when i remove both icon and smallIcon, same Bell shaped default icon. Even with res://icon.png same thing. Please help.

@iamola
Copy link
Author

iamola commented Feb 7, 2017

Added files to the /www, /www/img, /www/res, folder and tried all location using both file://img/icon.png and res://icon.png and nothing. :/

@tsilas
Copy link

tsilas commented Feb 8, 2017

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.

@iamola
Copy link
Author

iamola commented Feb 8, 2017

6.4.0, didn't work. 6.0.0 definitely worked. The latest version that seems to work fine is: 6.3.1. Thanks @tsilas

@iamola
Copy link
Author

iamola commented Feb 15, 2017

@rwillett Why close it if its not a fix. Its only a workaround and still needs to be fixed. -___-

@rwillett
Copy link
Collaborator

From reading this it appeared that this is a phonegap issue not a plugin issue

@iamola
Copy link
Author

iamola commented Feb 15, 2017

Maybe, maybe not. The root cause is still not known. Maybe Phonegap changed a feature and has to be updated in the plugin. Just speaking from a quality view.

@rwillett
Copy link
Collaborator

Have you raised this with the PhoneGap people?

@astutesoftware
Copy link

Facing the same with cordova 6.5.0 - Icon remote and local both do not render on android pixel phone.

@bilalsoomro
Copy link

I can also confirm that the icon and small icon are not working in cordova version 6.5.0. And I can't downgrade cordova as this always creates new issues for my app.

@rwillett
Copy link
Collaborator

rwillett commented Mar 14, 2017

I can confirm that it does work with Cordova 6.5.0 on local builds and Android 5 and 6. We do not use Phonegap build or have a real phone with Android 7.0 on it so we tried this with Genymotion using a Nexus 6P and API24 (thats Android 7)

macpro:ts rwillett$ cordova -v
6.5.0
macpro:ts rwillett$

We have our own small icon, and you can see that it does work below. Thats the white icon with three small cars.

screen shot 2017-03-14 at 06 15 06
screen shot 2017-03-14 at 06 13 15

You need to look at hooks and setting the icon properly.

@dpalou
Copy link
Contributor

dpalou commented May 15, 2017

I'm having the same problem too. I think the "res://" icons have stopped working because in the latest Cordova releases the icons are copied to res/mipmap folders instead of res/drawable. This could be solved with a hook, but Phonegap Build doesn't accept them so IMO it should be fixed in this plugin.

I tried using "file://" instead, but for some reason it isn't working for me either. Maybe it's because of the image size (pixels), but I tried different sizes without success (36x36, 48x48, 72x72, 96x96, 144x144, 192x192). I debugged the code a bit (getUriFromAsset) and the file is found and copied, but it's still not shown. Any ideas?

@dpalou
Copy link
Contributor

dpalou commented May 16, 2017

I created a Pull Request to fix the "res://" problem:

#1292

I tested it and it seems to work, but it would be fine if someone could review it since I haven't developed for Android since Android 4.3 :)

@Topiya
Copy link

Topiya commented Dec 6, 2017

@rwillett
Can you please let me know what should be the icon image size and what should be the image path?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants