It would be really nice to build-in application icon support for all platform in MoSync.
Regards
Dennis
It would be really nice to build-in application icon support for all platform in MoSync.
Regards
Dennis
I am watching this space 
What is the status on application icons?
Good news and thank you for watching.
Icon support will be in the next release,
the beta should be out within a week or so.
/tony
In the nightly builds, since r576, there's experimental icon support for Java ME and Symbian S60, 3rd edition. Note that your icon must be in SVG format for it to work on S60.
Is there any documentation for this? where we should put our icon ?
We don't have any proper documentation yet, as the system is a little bit buggy.
For now, place a file called "icon.xml" into your project directory. Its content should look like the code below. This file defines the icons available for your project, and their sizes, in pixels.
<?xml version="1.0" encoding="UTF-8"?> <icon> <instance size="default" src="star2t.svg" /> <instance size="32x32" src="star2q.png" /> </icon>
SVG icons must conform to the SVT-Tiny standard. An example SVG-T file is attached.
When updating an application on Symbian phones with a changed icon, due to a bug in the Symbian OS, the icon displayed will not change until you restart the phone.
Hi Fredrik,
I was wondering why my icon.mif commented out from my PKG file:
here's my icon.mif inside my pkg file:
;"C:\MoSync\workspace\activefile\FileExplorer\FinalOutput\Release\Nokia\6110_Navigator\package\ede9dd39_icon.mif" -"!:\resource\apps\ede9dd39_icon.mif"
Should i put the svg or png into my project directory root ?
That is a bug; we forgot to update the PKG template.
If you don't want to wait for a new build, you edit the file yourself. You'll find it in \mosync\eclipse\plugins\com.mobilesorcery.sdk.builder.s60_1.0.0.jar\templates\.
Project root is fine, although you should be able to put the svg in a subdirectory too, if you like. Its path is relative to the icon.xml file.
I find that instead of icon.xml must be created file with icon.xml content and .icon extension, then no need to change template.
The only bug that I do find is, that icon-injector.exe tool does not adds quotation marks to the path when calls ImageMagick's convert. So if you have Project path with spaces, the MIF creation process will fail.
The only bug that I do find is, that icon-injector.exe tool does not adds quotation marks to the path when calls ImageMagick's convert. So if you have Project path with spaces, the MIF creation process will fail.
Thank you. I'll go through the icon-injector to add quotation marks wherever needed.
My preview post was based on r915.
Today I have installed r1006 - quotation mark is added, but unfortunately another bug appears,
this is console log from building:
c:\MoSync\bin\icon-injector.exe -src C:\MoSync\workspace\test\icon.icon -size 16x16 -platform more -dst C:\MoSync\workspace\test\Output\Release\\more.png The filename, directory name, or volume label syntax is incorrect. about to parse... We have an icon! parsed "c:\MoSync\bin\ImageMagick\convert" "C:\MoSync\workspace\test\test.svg" -resize 16x16 "C:\MoSync\workspace\test\Output\Release\\more.png" Error 1 Image Magick failed.
I tried to run command
c:\MoSync\bin\icon-injector.exe -src C:\MoSync\workspace\test\icon.icon -size 16x16 -platform more -dst C:\MoSync\workspace\test\Output\Release\\more.png
from console - still it gave me error:
C:\>c:\MoSync\bin\icon-injector.exe -src C:\MoSync\workspace\test\icon.icon -size 16x16 -platform more -dst C:\MoSync\workspace\test\Output\Release\\more.png about to parse... We have an icon! parsed "c:\MoSync\bin\ImageMagick\convert" "C:\MoSync\workspace\test\test.svg" -resize 16x16 "C:\MoSync\workspace\test\Output\Release\\more.png" The filename, directory name, or volume label syntax is incorrect. Error 1 Image Magick failed.
However when I run just the convert command exactly as icon-injector states ("c:\MoSync\bin\ImageMagick\convert" "C:\MoSync\workspace\test\test.svg" -resize 16x16 "C:\MoSync\workspace\test\Output\Release\\more.png") - all was finished successfully.
Also there is double backslash before more.png ( ...\Release\\more.png ). It's OK, but better to be removed additional backslash.
Build (r1041) - same problems with icon-injector.exe :roll:
Windows' command line parser had me pulling my hair out for a while. Finally found something that worked. See r1051.
Thanks a lot for your patience with Windows' command line parser 
In my last post forgot to point that it does not works 
Yea, thanks a lot for your patience with Windows' command line parser, however the situation is pretty same as before - the best result was with r915.
Today checked r1175
The build log states:
We have an icon! parsed ""c:\MoSync\bin\ImageMagick\convert" "C:\MoSync\workspace\Test\TestLOGO.svg" -resize 16x16 "C:\MoSync\workspace\Test\Output\Release\\more.png" c:\MoSync\bin\e32hack.exe c:\MoSync\profiles\runtimes\s60v3\1\MoSync.exe C:\MoSync\workspace\Test\FinalOutput\Release\Nokia\6120_classic\package\e03b853c.exe e03b853c found uid @ 0x18c c:\MoSync\bin\icon-injector -src C:\MoSync\workspace\Test\icon.icon -size 53x53 -platform symbian9 -dst C:\MoSync\workspace\Test\FinalOutput\Release\Nokia\6120_classic\package/e03b853c_icon.mif The filename, directory name, or volume label syntax is incorrect. about to parse... We have an icon! parsed "c:\MoSync/bin/mifconv.exe" "C:\MoSync\workspace\Test\FinalOutput\Release\Nokia\6120_classic\package/e03b853c_icon.mif" "C:\MoSync\workspace\Test\TestLOGO.svg" Error 1 mifconf failed c:\MoSync\bin\makesis-4.exe C:\MoSync\workspace\Test\FinalOutput\Release\Nokia\6120_classic\package\e03b853c.pkg Processing C:\MoSync\workspace\Test\FinalOutput\Release\Nokia\6120_classic\package\e03b853c.pkg... C:\MoSync\workspace\Test\FinalOutput\Release\Nokia\6120_classic\package\e03b853c.pkg(26) : error: file not found *** COMMAND LINE WITHHELD, CONTAINS PASSWORDS *** C:\MoSync\workspace\Test\FinalOutput\Release\Nokia\6120_classic\package\e03b853c.sis: No such file or directory
However when all commands where copied and entered to command line the e03b853c.sis was packed successfully.
I'll try reinstall r915, and try the icon-injector from that package with new build of MoSync. :?
You can easily application icons to your projects. All you need to do is to add a file to the project with the *.icon extension and in that file put a few lines of XML. You also, of course, need to add the icons themselves to the project. MoSync handles the rest.
Here is a typical .icon file:
<?xml version="1.0" encoding="UTF-8"?>
To know if the application icon was added correctly during the build process, you only need to look at the last few lines of the IDE console for guidance.
There are a few simple guidelines to keep in mind when you add an icon.
1) Some platforms accept only a few image file formats. Symbian for example only accepts SVG format icons. A general rule of thumb is that SVG and PNG formats together cover all the platforms. A good way to step around this problem is to have your icon in both PNG and SVG formats and list both of them in the .icon file. The compiler will then try all the icons and pick one that it feels is the best match (based on size, image type) for the platform.
2) When adding icons for a Java device, it is important to take a look at the device profile information in the MoSync SDK. The device profile should contain the parameters MA_PROF_CONST_ICONSIZE_X and MA_PROF_CONST_ICONSIZE_Y and the size of the image file should be consistent with the icon size listed in the profile. (Alternatively, make sure that all your target devices support icon of the size you provide.)
3) It has also been observed that on Symbian devices the application icon may not appear if the application is reinstalled. In this case, a quick restart of the phone makes the icon visible.
Please keep in mind that this feature of the MoSync SDK is experimental. Some platforms may show unexpected results. Let us know if you find issues.
Its work in progress, watch this space.
/Tony