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
studiochris
Posts: 165
Registered: ‎10-26-2010
My Device: BlackBerry® PlayBook™
My Carrier: .

Trial and Error Discoveries

[ Edited ]

Just for reference, I'm not using Flash Builder, I'm using FlashDevelop and Flash Professional CS4 with the command line compiler. Some of this may apply to the Flash Builder plugin as well.

 

Some of this comes from the AIR 2.5 release notes (worth a look-over) which are located at:

 

http://kb2.adobe.com/cps/868/cpsid_86822.html#main_Changes in AIR 2.5

 

The documentation appears to be lacking, so here's what I've learned so far:

 

  • Be sure to change your application descriptor's AIR version to 2.5 if it is still set for anything below.
  • <version></version> has been replaced with <versionNumber><versionNumber>. The compiler will fail with <version>
  • The value for <versionNumber> must be x.y.z (ie. 1.0.0 - major.minor.bugfix/patch with numbers inside of the range of 0-999). The compiler will throw an error if all 3 are not present. 
  • You cannot use x.y.z.a (ie. 1.0.0.0) or any other format. The compiler will yell at you.
  • While compiling with the correct versionNumber format, the compiler will report the version number as x.y.z.a (ie. 1.0.0.0). It will add a segment to the version number in your descriptor. If you get an error saying:

    Invalid manifest file path/to/temporary/file
    Invalid value '1.0.0' for Package-Version

    even though it reports the Package-Version in the format it ultimately wants, it's telling you that you've only indicated "1.0" in the descriptor. It's odd and I would consider it a bug, but that's what happens.

    This is also contrary to the release notes which do say to use the triplet format, but also give examples of "valid" version strings that do not follow that convention. They are not valid for the BlackBerry Tablet SDK from my testing.
There is also one example that I've found at Adobe from the Labs page, and it has some incorrect information in it regarding the application descriptor file. Leave out the icon information, and follow RIM's Getting Started PDF for the icon or else the compiler will throw an error. They also have the icon size wrong by using 72x72, while according to the guide, the icon should be 90x90.
Good luck, and if you find anything, please feel free to add to the thread.
:smileyhappy:-
Chris

 

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

Re: Trial and Error Discoveries

[ Edited ]

BAR files are ZIP archives like AIR files on the desktop.

 

Unzip with your favorite archiving application (7Zip works well on PC) and open MANIFEST.MF in a text editor to get the Package-Id which will be needed to uninstall test apps when using blackberry-deploy

 

 


 

In the previous post with the version number strangeness, it appears that even with the incorrect format for the version, the app does compile despite the error (seen through looking at the manifest file), though it isn't installed on the simulator unless everything runs through error free.

Please use plain text.
Contributor
liliana_v
Posts: 35
Registered: ‎10-25-2010
My Device: Not Specified

Re: Trial and Error Discoveries

Regarding versions:

These are 2 different version numbers

1.0.0 is version enforced by air

1.0.0.0 is version enforced by bar files (RIM app version).

Second one is generated from first  one by airpackager using this rule:

airVersion + "." + buildId

 

buildId is 0 by default but can specified in the airpackager command line (not from IDE)

 

Regarding uninstall (and terminate and launch):

deploy too can extract package id and name from the .bar file, so to uninstall app you simply use

blackberry-deploy -package qq.bar -uninstallApp -device 10.10.10.10

 

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

Re: Trial and Error Discoveries

Very good information to have. Thanks for sharing. I think along with playing with the SDK, I'm going to attempt to make a GUI for the command line with AIR for desktops, at least for Windows. so it isn't quite as confusing.

Please use plain text.
Developer
CTR1
Posts: 76
Registered: ‎10-28-2010
My Device: Blackberry Curve 8320
My Carrier: T-Mobile

Re: Trial and Error Discoveries

If you do make some kind of GUI that would be pretty awesome! Maybe that could be your app to get a free Playbook?! :robotsurprised:

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.
New Developer
SandroDucceschi
Posts: 9
Registered: ‎10-29-2010
My Device: Blackberry Tablet OS Simulator

Re: Trial and Error Discoveries

Another Tip:

 

If you are trying to display QNX Dialogs, don't be suprised if they won't show up in the AIR Debugger and crash your application. They will only work properly if you run the application ON the simulator.


Click on "Accept as Solution" if this post solved your problem. If you thought it was helpful, why not give some :smileywink:
Please use plain text.
Developer
studiochris
Posts: 165
Registered: ‎10-26-2010
My Device: BlackBerry® PlayBook™
My Carrier: .

Re: Trial and Error Discoveries

I'm working on a GUI for the command line swf compiler, bar file compiling, installation, launching and uninstalling from the simulator - I can only do it for Windows though. It'll hopefully be finished tomorrow or by Monday at the latest. 

 

I'll look into the Mac side when I get Windows done to see if I can add it in.

 

Chris

Please use plain text.
Developer
CTR1
Posts: 76
Registered: ‎10-28-2010
My Device: Blackberry Curve 8320
My Carrier: T-Mobile

Re: Trial and Error Discoveries

That's awesome! Can't wait to try it soon!

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.