Where to load app Icon image


Donald Walker

First of many post to come.

I can see your AB icon in the file manager, but how do I add a new one? Is there a link to explain this?

I also see that I can locate an image with the image control but don't see the way to add the app Icon.

DataDon


DecSoft

Hello Donald,

We can specify the app's icon from the Interface tab of the app's option dialog: Menu -> Edit -> App options.



Donald Walker

Well that's pretty obvious :-)

But...I started my app with one of your samples and modified it. I then created my own 256x256 icon.png. It shows up in the app manager as the icon. I also added it to file manager list and took your old icon out. However when I create the apk it always shows you app icon. (actually not a bad idea for you as you get extra advertising...just kidding) What say you?


DecSoft

Hello again,

Curiously I update App Builder right now in order to enhance the app icon store way. Now App Builder stores a relative to the application icon path, and not an absolute path. This means we can move our application files between different systems, where absolute paths can cause problems. So update your App Builder copy Donald to get ready with this new way to store the icon path.

About your issue, please, try to answer these questions:

1º Are you using a PNG image?

2º Can you view such image copied into the "_Compiled" directory?

I will to made some test right now.



Donald Walker

To answer you questions:

1. it is a png

2. my wanted icon shows up in ....Compiled\www\app\images\

I will install latest version shortly.


DecSoft

Hello Donald,

Maybe the PNG image have some "problem" or something like that? Can you send me a copy of the image? As you can see in the attached file, I prepare an "Icon" sample application and they works like expected also in Android.

Download the Icon sample

P.S. You need the very latest release of App Builder to test the sample, since they take the advantage of the latest enhancement and the icon file is stored relative to the application.



DecSoft

Hello Donald,

It's quite rare. I receive your icon image and test it and the icon appear working like expected.

I update the above sample in order to use your image instead of mine, so, please, try it with the application and the APK too:

Download the Icon sample



DecSoft

Hello Donald,

Take a look at the "Icon_Compiled\platforms\android\res" directory and search for your icon. On the other hand, try with other icon image. If list last works, try to open your icon image with some editor and save it again... maybe we get a chance with that icon image.

P.S. Probably I appear a little stupid... since the image appear valid here in my computer... how is possible they are not valid in your computer?...



Donald Walker

\android\res\ has a folder called res\icons\ in it that has your icons in it. my icon is in the res\

I will try other suggestions and get back to you.


Donald Walker

This is what the config xml file shows:

I think those are your icon images in diff sizes.


DecSoft

Hello,

Yes. The XML refers to the different icons prepared from your original icon image by App Builder.

The point may is, can you view the icon in the above sample APK? If you use other image they works?



Donald Walker

I'm a bit confused. The xml config files shows the icons are coming from the res/android/icons/ folder and there are a numbr of different size icons. my icon on the other had sits outside the /icons folder and there is only 1 size. Does the app builder create the different size icons? If so why is not building them from my image (tired with other icons you sent as well and does the same thing)

Should I delete the build and start over?


DecSoft

Hello Donald,

Yes; App Builder taken your image icon and prepare it (in different sizes) for different platforms. But I think that's not the point, because this is something transparent for us, Donald. The problem is why your image works in my computer and not in your computer, and why you can use other images (if you can use it, I asume it since you can view the default icon image) and not an image in particular...



Donald Walker

Ok got it to work. Here is the possible answer. I tried using 256x256 images (even your own) and it kept giving me errors during the debug and compile. Erros about invalid image. So I created a new icon png that was 600x600 and tried it and it worked great.

I know you said it worked fine on yours but it did not on mine until I got a new fresh 600x600 image.

?? not sure what was real issue but it is fixed now. I will send you app if you want or apk or nothing.

Thanks for the help and now I know what to expect as output to res folder.


DecSoft

Hello Donald,

Wait a moment... there is no reason to use a 600px image! If you have problems with certain image, maybe you can convert it to other format, for example, JPG, and then, again to PNG. Or to open it in an editor and save it as PNG with a different optimization setting.

For example, try to use the image you attach me in your last email: maybe Google perform some changes in the image and for that reason they works to me. Send me the image in a Zip file too, so may I can try with the image exactly like you.

What about the invalid image error you get? The error message says something useful?

Of course we can go ahead by using your current (600px) working image, but in that way we never know what happend...



Donald Walker

I will send you files that did not work along with those that did.

The size of 600x600 was chosen arbitraily. I also deleted the original compiled folder and ran from scratch with new image.

I think the error message was due to the fact that I did not run the debugger before I ran the builder. If I did that they message went away.

Icons are coming your way via email now. Along with APK


DecSoft

Hello,

Oh yeah... I forget something may important here: App Builder does not create new icons if the icons exists (to save compile time) so, if we are talking about trying different images... probably we need to delete the compiled directory manually.

Take care about this Donald!



DecSoft

Hello again,

This is what happend when I select the image you send me from App Builder:

However, open the image with MS Paint and save it again, does not produce the same error. So I think the original image is corrupted or something like that Donald, but may you can simply do what I do: use the MS Paint, save the image again, and try it.


Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.