Setting the Icon for my app on Android

6 posts / 0 new
Last post
gretty
gretty's picture
Offline
Mobile Wizard
Joined: 27 Jan 2011
Posts:
Setting the Icon for my app on Android

Hello

I am trying to set the icon for my app so I can release it in Android but I dont know how?

It says here on google to change the manifest.xml file to set the icon, but becuase mosync compiles to a .apk (with the manifest.xml in it already?) I dont know how I can do this?
http://developer.android.com/guide/publishing/preparing.html

Quote:

4. Specify an icon and label in the application's manifest
The icon and label that you specify in an application's manifest are important because they are displayed to users as your application's icon and name. They are displayed on the device's Home screen, as well as in Manage Applications, My Downloads, and elsewhere. Additionally, publishing services may display the icon and label to users.

To specify an icon and label, you define the attributes android:icon and android:label in the element of the manifest.

As regards the design of your icon, you should try to make it match as much as possible the style used by the built-in Android applications

Any advice on how to set the app icon would be really helpful :)
Plus any adivce on how to do it for iOS would be cool if anyone knows it.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Diego Velazquez
diegolv's picture
Offline
Mobile Wizard
Joined: 4 Oct 2010
Posts:

Hi,

create an xml file with .icon extension and icons.

This is my MyApp.icon
<?xml version="1.0" encoding="UTF-8"?>

Regards,

Diego

cirko
cirko's picture
Offline
Joined: 11 Jan 2012
Posts:

Have the same stupid problem, why don't mosync not just add a "add icon button"..

Anyways Have made a MyApp.icon xml file:

<?xml version="1.0" encoding="UTF-8"?>

------------

cirko
cirko's picture
Offline
Joined: 11 Jan 2012
Posts:

Sorry can't edit..

I have made i new xml and just insert the code with:
<?xml version="1.0" encoding="UTF-8"?>

But the stupid mosync logo just showing up in launcher menu.
Or where are the loc to the icon, then i can just replace the image?

Sam Pickard
rival's picture
Offline
Mobile Archmage
Joined: 19 Mar 2009
Posts:

Hi, the forum has stripped out some of the xml.  It should look something like this.  

<?xml version="1.0" encoding="UTF-8"?>
<icon>
    <instance size="default" src="star2t.svg" />
    <instance size="32x32" src="star2q.png" />
</icon>

What you need to do is have your icon in SVG format.  The packager will convert it to the right size and format for every platform. Alternatively you can add the png, but it won't be compatible on Symbian.

Felix Kenton
fpkenton's picture
Offline
Mobile Conjurer
Joined: 5 Sep 2011
Posts:

If you have correctly got the icon to work, here is a small hack to get a larger icon size into your .APK

1. Finalise your build as usual to get a signed apk.
2. In your project directory, go into "FinalOutput/*Your build*/Android/*Android ver*/package/res/drawable/" and replace the file "icon.png" with a different one.
3. Copy-paste the last few commands in the MoSync output into a command window, starting with 'aapt'. When entering the last line removes the switches that have been *HIDDEN*, and then enter your keystore password when prompted.

I used this method to get a larger version of the icon into my .APK. MoSync currently converts the icon to 36x36 by default, which looks blurry on all but the lowest resolution phones. A larger icon (eg: 72x72) seems to be downscaled fine on lower density phones and still looks good on higher ones.