Greetings 2 all.
As some of you probably now, adobe has released the air2beta2 at their labs, which brings new ablities like:
- Enhanced support for interacting with printers (beta 2)
- Support for TLS/SSL socket communication (beta 2)
- Support for the detection of mass storage devices.
- Advanced networking capabilities like secure sockets, UDP support, and the ability to listen on sockets.
- Support for native code integration.
- The ability to open a file with its default application.
- Multi-touch and gesture support.
- New APIs for access to raw microphone data.
- Webkit update with HTML5/CSS3 support.
- Global error handling.
- Improved cross-platform printing
- Improved security and support for enterprise and government standards.
- Native process support
I’ve spend the whole day yesturday playing with the new api and in order that you not waste your time adjusting the sdk’s, figuring out how to build an exe/dmg file with full sdk support i’ve decided to post a little tutorial here.
So, first of all you should start with downloading the air sdk @ http://labs.adobe.com/downloads/air2.html and overlay it for use with Flex SDK.
Here‘s a nice instruction on how to overlay the air sdk.
Once you’ve done that you are ready to start building apps using the new api.
How to create an air2beta2 file:
1. open your application xml file and make sure you’ve added the extended desktop support:
2. compile your application at an AIR file (use the “export release build” option for example)
3. once you’ve created an AIR file u just compile it to an exe/dmg/rpm file (that’s needed for your app to be able to use the new sdk abilities) using the console (well, i did it that way)
adt -package -target native exported_file_path your_air_file_path
Example (for exe):
adt -package -target native C:\AIRSample.exe C:\dev\air\AIRSample.air
Example (for dmg)
adt -package -target native C:\AIRSample.dmg C:\dev\air\AIRSample.air
Example (for rpm)
adt -package -target native C:\AIRSample.rpm C:\dev\air\AIRSample.air
If you’r on windows, you can use my small app that converts air => exe/dmg/rpm i.e. it’s a GUI for the adt for those who don’t like console usage. I called it AIRPackager.
Hope 2 help/save yr time.
Nice apps building
Ps: you can also download the source files of my sample PowerOff application that uses the NativeProcess class and use it as a sample air2beta2 app.