Archive for AIR 2

Jump Start your Adobe AIR Application Development with Adobe AIR Launchpad

Posted in Adobe AIR, Flex/AIR with tags , , , , on August 20, 2010 by devgirl

If you’ve been developing with Adobe AIR, you may find yourself often re-using pieces of code to do things such as centering your application on the screen, adding auto-update, handling network connectivity or using a local database. I just completed work on a new application from the Adobe Evangelism team called Adobe AIR Launchpad that will allow you to jump start your application development. The Adobe AIR Launchpad is an AIR application itself and allows you to choose from various options that will result in a fully generated Flex project with the settings and code selections chosen. The project can then simply be imported into Flash Builder 4 for further editing and development. The Adobe AIR Launchpad consists of 4 steps to take you through the building of your app, from the settings such as size, system chrome etc that you would usually need to update the app-descriptor XML for, to generating install badge files with a custom image if desired on the final step. The settings also allow you to specify icons for your application and the size and type will be validated to prevent error. The settings and code configuration screens are shown below:

The application also allows you to choose from sample code options to be generated which can be especially helpful for newbies to get up to speed more quickly. The samples are derived from our Tour de Flex samples and generated as tabs in the resulting Flex project. They include choices such as how to start a native process, how to use the socket API, and implementing drag and drop. The screen of sample code options is shown here:

The final generate screen is shown below and has the option to include an image for the install badge:

An example of a generated application with all the sample code options selected is shown here:

The code that is generated also has comments inline and adheres to best practices. Here is a screenshot of what some of it looks like:

Note that the code generated from the app relies on features from the AIR 2 SDK, so if you’re not using it, or the Flex 4.1 SDK (which includes AIR 2 and Flash Player 101), then I highly recommend downloading the latest version here. You can install the Adobe AIR Launchpad now from Adobe Labs and can have a stubbed-out full AIR application project with auto-update, install badge files created etc in a couple of minutes or less. The release is beta and we are really looking forward to hearing feedback on the application and things that could be added or changed. I will be working on adding all the mobile options in support of the Flex Hero release as well, which I believe will ultimately make this tool even more of a must-have to get you quickly developing AIR for mobile apps!

Related posts to check out regarding Adobe AIR Launchpad:
Greg Wilson’s Ramblings
James Ward’s Blog – Adobe AIR Launchpad Intro Video
Marcel Boucher’s ‘Mind the Gap’ Adobe blog
Michael Chaize’s RIAGora blog

Also see a demo of it in this excellent video by Michael Chaize:
Advertisements

AIR 2 / Flash Player 10.1 Beta Info

Posted in Adobe AIR, Flex 4, Flex/AIR with tags , , , , , on December 21, 2009 by devgirl

The Adobe AIR 2.0 Beta and Flash Player 10.1 Beta releases are out and filled with some really cool, fun and powerful features. These are big releases as far as increasing developer productivity and in my opinion will further convince people to choose the Flash Platform as their technology direction.

I’ve been working with these two prereleases on top of Flash Builder (Flex 4) to build samples for Tour de Flex and made some notes on them as I’ve been trying the different APIs. I will summarize what I have learned so far and add to this post as I continue through them. Some of these may be totally obvious, but I will list them here anyway. The current Tour de Flex samples were built using the AIR 2.0 SDK build 121509. You can download AIR 2.0 Beta here. Some things to note:

1. Microphone Sample – this sample can be used with the internal microphone but you do need to make sure it is enabled and the volume is up. I also had to increase the volume on the Flash Player settings on my Macbook for the microphone to pick up the sound. To check your settings, go here and right click on the settings manager image, then choose ‘Settings’, and Microphone.

2. Gestures Sample – this sample requires multi-touch enabled hardware. I am using a Macbook which does have multi-touch support in the trackpad, but unless you have this or a multi-touch enabled device, the sample may not work for you. This article lists some devices that contain the support, as well as some other very useful info. Also, many samples out there are straight ActionScript classes that extend Sprite (for instance the one in the article referenced above). If you copy these into an AIR project and set the ActionScript class as the default application, you may find that you still see nothing when you run it. That is because you still need to go into the application descriptor file (yourappname-app.xml) and set the visible flag in the initial content to true. For instance:

...
<initialWindow>
		<!-- The main SWF or HTML file of the application. Required. -->
		<!-- Note: In Flash Builder, the SWF reference is set automatically. -->
		<content>[This value will be overwritten by Flash Builder in the output app.xml]</content>

		<!-- The title of the main window. Optional. -->
		<!-- <title></title> -->

		<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
		<!-- <systemChrome></systemChrome> -->

		<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
		<!-- <transparent></transparent> -->

		<!-- Whether the window is initially visible. Optional. Default false. -->
		<visible>true</visible>
...

3. Global Error Handler Sample – this will only work right if you are running in ‘Run’ mode, debug mode will stop on the error itself and thus not be ‘handled’.

4. Native Process Sample – this sample assumes some default paths on the different OS’s, so if you have something custom then the ping may not work unless you change the path to the correct executable for your particular installation.

5. Socket Server Sample – this sample has two apps within it, a client app and a server app. The ServerSocket class is the new AIR 2 class allowing your app to be a socket server, and should first be started with the SocketServerSample.mxml file. Simply hit the ‘Listen’ button to start the server then run the SocketClientSample.mxml file to open the socket to the server and send data to it.

*** Note: Tour de Flex updated with the next five January 17, 2010 ***

6. Mass Storage Device Detection – this sample will allow you to access an external storage device such as a USB drive. Plug in an external device while running the sample and you will see the information about the device displayed as well as have the ability to browse the contents.

7. NetworkInfo – this sample will show your currently available network interfaces and some corresponding information about them.

8. Globalization – there are a few samples here that show how you can now do formatting of dates, numbers and currency based on a selected locale.

9. OS File Security Download – this sample shows how you can use the new File.downloaded property to check if a file has been downloaded or not. Run the sample and double click on a file, and a message will be displayed to indicate its download status.

10. DNS Lookup – this sample allows you to retrieve information about a specified Domain Name Server address. Simply run the sample and enter the domain name to perform a lookup. It also gives you the ability to specify an IP address and do a reverse lookup. This sample was based on a sample found here: http://www.insideria.com/2009/10/air-2-enhancements-complete-ov.html

Lastly, here are some good links with more information and samples for these two prereleases: