Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon
Accepted Solution

Setting Application Icon

Has anyone been able to set the application icon to a 72x72 PNG file.  I've tried the AIR method (adding it to the application XML file),

 

<icon>
		<!--<image16x16></image16x16>-->
		<!--<image32x32></image32x32>-->
		<!--<image36x36></image36x36>-->
		<!--<image48x48></image48x48>-->
		<image72x72>hello.png</image72x72>
		<!--<image128x128></image128x128>-->
</icon>

 

but I get a install error with blackberry-airpackager.

 

<app-name>-app.xml error 303: Icon <name>.png is missing from package.

 

The file is there and even copied to the bin-debug directory.

 

Thank you in advance...

John

Please use plain text.
BlackBerry Development Advisor
elena_laskavaia
Posts: 417
Registered: ‎10-27-2010
My Device: PlayBook

Re: Setting Application Icon

If you are running packaging from command line you have to add your icon file to command line arguments.

Please use plain text.
Developer
fnicollet
Posts: 85
Registered: ‎10-25-2010
My Device: Not Specified

Re: Setting Application Icon

elena_laskavaia is right, you have to add the source path to your icons into the command line. Simply add " hello.png" at the end of your command line, there is no options to give it

 

Hope this helps,

Fabien

Hope this helps,
Fabien

--
1. If you liked my post or found it useful please click on the white star and provide a Kudo!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!
Please use plain text.
Developer
CTR1
Posts: 76
Registered: ‎10-28-2010
My Device: Blackberry Curve 8320
My Carrier: T-Mobile

Re: Setting Application Icon

just wondering but didn't they say that the app icons should be 90x90?

C41vin Tirr311
O.O -_-
-Look through the posts before posting a new question.
-Kudo people who posted something you found helpful.
Please use plain text.
Developer
fnicollet
Posts: 85
Registered: ‎10-25-2010
My Device: Not Specified

Re: Setting Application Icon

Yup, you are right CTR1, icons are 90x90px, you have to add this line to the presets in the XML descriptor file

 

Fabien

Hope this helps,
Fabien

--
1. If you liked my post or found it useful please click on the white star and provide a Kudo!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!
Please use plain text.
Developer
Harry_Dodgson
Posts: 151
Registered: ‎10-26-2010
My Device: Bold 9900
My Carrier: AT&T

Re: Setting Application Icon

Hi,

 

per the Webcast yesterday, icons are supposed to be 72x72.  I tried 90x90 once and it rejected it as an invalid size.

 

Harry

--------------
Accepted PlayBook Applications: Marmi-doos, BASIC, Run and Hide
Please use plain text.
Developer
studiochris
Posts: 165
Registered: ‎10-26-2010
My Device: BlackBerry® PlayBook™
My Carrier: .

Re: Setting Application Icon

The compiler for AIR rejects 90x90 in the descriptor, but the simulator displays 90x90 icons.  The Getting Started docs from BlackBerry say to name your 90x90 icon blackberry-tablet-icon.png and the BlackBerry compiler will pick it up and recognize it as the icon, even though it isn't listed in the descriptor.

 

You do need to include it in your list of files for the BAR compiler though.

 

With the way AIR icons work, a 128x128 (or 72x72) icon may work as well, and it is a standard size for teh app descriptor file. For Desktop AIR applications, if the requested icon size isn't available, it uses the closest size that is available and scales it for display. I'm not sure this works for the tablet SDK though.

Please use plain text.
BlackBerry Development Advisor
elena_laskavaia
Posts: 417
Registered: ‎10-27-2010
My Device: PlayBook

Re: Setting Application Icon

If you specify icon which is not 90x90 it will be scaled automatically, which may look ugly. If you want same app to be used for different platforms (like blackberry and android) you would need to provide two icons of different sizes, one for blackberry one for another platform.

Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Setting Application Icon

Verified the process:

 

In the application.xml file:

 

<icon>
		<!--<image16x16></image16x16>-->
		<!--<image32x32></image32x32>-->
		<!--<image36x36></image36x36>-->
		<!--<image48x48></image48x48>-->
		<image72x72>assets/mendelbrot.png</image72x72>
		<!--<image128x128></image128x128>-->
	</icon>

 The <icon><image>...</image></icon> in the blackberry-tablet.xml file does not seem to do anything.

 

In the blackberry-airpackager command, just add the path to the icon:

 

blackberry-airpackager -package Mandlebrot.bar -installApp -launchApp -C bin-debug Mandlebrot-app.xml Mandlebrot.swf assets/mendelbrot.png -device 192.168.192.129

 

The image is 72x72 and NOT 90x90.

 

Please use plain text.
Developer
studiochris
Posts: 165
Registered: ‎10-26-2010
My Device: BlackBerry® PlayBook™
My Carrier: .

Re: Setting Application Icon

[Right click and open in new Window/Tab for a clear copy]

 

The icon is 90x90. Adobe has it wrong in their example.

Please use plain text.