Adobe
Products
Acrobat
Creative Cloud
Creative Suite
Digital Marketing Suite
Digital Publishing Suite
Elements
Photoshop
Touch Apps
Student and Teacher Editions
More products
Solutions
Digital marketing
Digital media
Education
Financial services
Government
Web Experience Management
More solutions
Learning Help Downloads Company
Buy
Home use for personal and home office
Education for students, educators, and staff
Business for small and medium businesses
Licensing programs for businesses, schools, and government
Special offers
Search
 
Info Sign in
Welcome,
My cart
My orders My Adobe
My Adobe
My orders
My information
My preferences
My products and services
Sign out
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out My orders My Adobe
Preorder Estimated Availability Date. Your credit card will not be charged until the product is shipped. Estimated availability date is subject to change. Preorder Estimated Availability Date. Your credit card will not be charged until the product is ready to download. Estimated availability date is subject to change.
Qty:
Purchase requires verification of academic eligibility
Subtotal
Review and Checkout
Adobe Developer Connection / Adobe AIR Developer Center /

What's new in Adobe AIR 3

by Christian Cantrell

Christian Cantrell
  • blogs.adobe.com/cantrell

Created

21 September 2011

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
ActionScript Adobe AIR Android iOS mobile

Adobe AIR has come a long way since version 1.0 was launched at the beginning of 2008. We've added dozens of major features, hundreds of minor features, performance improvements, and bug fixes, and we now support three additional platforms: iOS (iPhone and iPad), Android, and Adobe AIR for TV.

AIR 3 is our eleventh release in less than two and a half years. Although all of our major releases have represented big steps forward, I think this one is the most significant. AIR 3 includes the following new APIs and capabilities:

  • Stage3D (desktop only). Stage3D is a set of low-level, hardware-accelerated APIs for both 2D and 3D rendering. For AIR 3, they are available only in the desktop version of AIR; however, they will be coming to mobile in the future. Stage3D is such a huge feature that it really wouldn't make sense to get into much more detail here—to learn more, see the Stage 3D page.
  • Native extensions (all platforms). This is another huge feature. Starting with AIR 3, developers can extend the AIR runtime by bundling native extensions with their applications, then calling those extensions from ActionScript (this was available in Adobe AIR for TV in AIR 2.5, but with AIR 3, it's now available on all platforms). You can think of native extensions for Adobe AIR (ANEs) as ActionScript libraries (SWCs) but implemented in native code. Use cases for ANEs include giving your application access to native APIs not supported by AIR (see examples below) and delegating to native code in some circumstances in order to achieve better performance. For more information on native extensions in AIR 3, see Extending Adobe AIR by Oliver Goldman.
  • Android Market licensing integration (Android only, obviously). Using an ANE file, developers can access the Android Market Licensing Service allowing publishers to enforce licensing policies. This is a great example of the power of native extensions: Since there are no equivalent APIs on iOS, it wouldn't make sense for us to add the functionality directly to AIR; however, ANEs make the APIs easily accessible to AIR applications running on Android.
  • Captive runtime bundles (Android and desktop). If you want to remove the need for your end users to download the AIR runtime in circumstances where they don't already have it installed (thereby making the application installation process indistinguishable from native applications), or if you want full control over the version of AIR with which your application runs, AIR 3 lets you bundle the AIR runtime right in with your application. Bundling the runtime is as easy as providing the apk-captive-runtime flag to ADT when building your Android app or the bundle flag when building your desktop app. (Note that AIR has always used a captive runtime approach on iOS, although the mechanism is a bit different.)
  • Background audio playback (new feature in iOS; already works on Android). Because of the unique multitasking implementation of iOS, it was previously not possible to continue playing audio from an AIR app that wasn't active. Starting in AIR 3, all you have to do is indicate in your application descriptors that they need to be able to play background audio and it will automatically work. (Basically, the application will continue running when it's placed in the background. However, all screen updates will be disabled in order to preserve battery life, and to comply with the multitasking requirements of iOS.)
  • CameraRoll support for iPad. Although CameraRoll was technically already supported on the iPad, we've added much better support in AIR 3. On iPads, the photo picker doesn't take up the entire screen, as it does on iPhones and iPod touches. Instead, it appears as a floating panel positioned relative to the UI component that invoked it. With the addition of the CameraRollBrowseOptions class, developers can choose the size and position of the image picker, and specify the location of the UI component that invoked it. For more information and a code sample, see my blog post, How to correctly use the CameraRoll API on iPads.
  • Hardware-accelerated video (mobile): AIR 2.5 brought hardware-accelerated video to TVs with StageVideo; now AIR 3 brings StageVideo to mobile as well.
  • Native text fields (mobile). Previous versions of AIR provided developers access to lower-level rendering capabilities with APIs like StageVideo (hardware-accelerated video) and StageWebView (native HTML rendering). AIR 3 introduces the StageText API which allows developers to place native text fields in their mobile apps. Although you can still use Flash text fields, of course, StageText text fields come with all the OS-specific perks like the magnifying glass, text selection, auto-correct, and so on.
  • Front-facing camera support (iOS and Android). The ActionScript Camera APIs now have access to both front and rear-facing cameras on iOS and Android devices (for Android devices, verion 2.3 or later is required). You can use the new Camera.position property along with the constants in the new CameraPosition class (BACK, FRONT, and UNKNOWN) to determine the location of the cameras. For more information and a code sample, see my blog post, Front-facing camera support in AIR 3.
  • Mobile-encrypted local storage (brings feature parity between desktop and mobile). The same EncryptedLocalStore APIs that are available on the desktop are now available on iOS and Android. This API is critical for securely storing user credentials, encryption keys, salts, and similar important information.
  • Device speaker control (mobile). Using the new audioPlaybackMode property on SoundMixer, and the constants in the new AudioPlaybackMode class (MEDIA and VOICE), developers can control whether audio is played through the phone's earpiece or speakers.
  • Native JSON support (mobile and desktop). Rather than using ActionScript to parse JSON, the runtime now provides more efficient native JSON support. The native JSON APIs are faster and use less memory than ActionScript implementations. For more information and a code sample, see my blog post, Native JSON support in AIR 3.
  • Socket improvements (mobile and desktop). It has always been relatively easy for developers to determine when data is written from the network to the ActionScript socket's read buffer (ProgressEvent.SOCKET_DATA), and to determine how many bytes are available for reading (Socket.bytesAvailable). However, the opposite hasn't been true. In other words, before AIR 3, there was no way to know that data had been successfully written from the ActionScript socket's write buffer to the network, and to know how many bytes were still waiting to be written. This led to situations where developers weren't sure if it was safe to call close() on a socket, or to know if there was a network operation still in progress when the user wanted to shut down an application. Starting with AIR 3, developers can use the OutputProgressEvent.OUTPUT_PROGRESS event along with the new Socket.bytesPending property to determine how much data has been written to the network, and how much data is still in the ActionScript socket waiting to be written. These new APIs should lead to more robust applications that rely on network access through sockets. For more information and a code sample, see my blog post, Socket improvements in AIR 3.
  • H.264 video encoding (desktop only). You can how encode video captured through the Camera class in H.264.
  • JPEG XR support (mobile and desktop). AIR 3 now supports JPEG XR, a new file format with several advantages over JPEG. For example, JPEG XR provides better compression, more lossless compression, more accurate colors, and alpha transparency. For more information, check out the Wikipedia article on JEPG XR.
  • Higher resolution bitmaps (mobile and desktop). In previous versions of AIR, bitmaps were limited to 16 megapixels (16,777,215 pixels) with a maximum width/height of 8,191. Starting with AIR 3, all limitations have been removed from AIR, which means maximum sizes are now imposed by the host operating system instead.
  • Multichannel audio digital output (AIR for TV only). Adobe AIR for TV can now play Dolby Digital Plus 5.1 Surround and DTS 5.1 audio streams. The new Capabilities.hasMultiChannelAudio property, the new AudioDecoder class (containing constants representing several different multichannel audio types), and changes to the Capabilities.serverString property all allow developers to detect a device's multichannel audio capabilities and to stream the correct audio bitstream both from ActionScript and through RTMP.
  • Advanced controller support (AIR for TV only). Using the new GameInput APIs, developers can build games that respond to advanced TV controllers. A number of new APIs allow for enumerating devices (available controllers), enumerating devices' controls (buttons, triggers, acceleration, etc.), and for getting control values from devices.
  • More easily removing all children from a container (all platforms). DisplayObjectContainer now has a removeChildren() function, which removes all the children in a single call. This certainly beats:
    while (this.numChildren > 0) this.removeChildAt(0)
  • More easily determine if a MovieClip is playing (all platforms). Easily find out if a MovieClip is playing using the new isPlaying property.
  • GC Advice API (all platforms). The new System.pauseForGCIfCollectionImminent function gives AIR developers more control over when the runtime's automatic garbage collection reclaims memory. Since animation or audio may pause during garbage collection, developers can use this function to encourage collection at times when the user is least likely to notice.
  • Secure random number generation (mobile and desktop). Adobe AIR has always had the Math.random function, which returns "pseudo-random" numbers—that is, numbers which appear to be random but always contain some element of non-randomness (a timestamp, for instance). AIR 3 provides a new method for generating random numbers called generateRandomBytes() located in the flash.crypto package. Since the generateRandomBytes() function uses OS APIs to generate random numbers (CryptGenRandom on Windows, /dev/random on OS X, /dev/urandom on Android, and SecRandomCopyBytes on iOS), the resulting random number is as cryptographically secure as the underlying OS.
  • Support for cubic bezier curves (all platforms). The new cubicCurveTo() function on the Graphics class allows you to programmatically draw cubic Bézier curves natively without the use of third-party ActionScript code.

Be sure to grab the latest version of the AIR runtime and SDK and let us know what you think!

For more details on the changes in AIR 3, refer to the release notes.

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License

More Like This

  • Installation and deployment options in Adobe AIR 3
  • Developing cross-platform Adobe AIR applications
  • 10 common mistakes when building Adobe AIR applications
  • Tips for building AIR applications that can be easily updated
  • Adobe AIR and the experience brand
  • Uploading images from CameraRoll and CameraUI
  • Getting started with Adobe AIR for Flex and ActionScript 3 developers
  • Ten tips for building better Adobe AIR applications
  • Deploying Adobe AIR applications seamlessly with badge install
  • Using the Adobe AIR update framework

Tutorials and samples

Tutorials

  • Using the iOS Simulator to test and debug AIR applications
  • Using the Amazon In-App Purchase Adobe AIR native extension for Android and Kindle Fire
  • Transferring data with AIR native extensions for iOS – Part 3
  • Exchanging Vector and Array objects between ActionScript 3 and C, C++, or Objective-C

Samples

  • Licensing Adobe AIR applications on Android
  • Using web fonts with Adobe AIR 2.5
  • Using Badger for Adobe AIR applications

AIR blogs

More
07/09/2012 Protected: Publishing Adobe AIR 3.0 for TV on Reference Devices
07/08/2012 Source Code: Adobe AIR 3.3 Retina Video Application
07/06/2012 Application specific File Storage on Adobe AIR based ios Application
07/04/2012 Recent Work - iPad/Android App: Inside My toyota

AIR Cookbooks

More
02/09/2012 Using Camera with a MediaContainer instead of VideoDisplay
01/20/2012 Skinnable Transform Tool
01/18/2012 Recording webcam video & audio in a flv file on local drive
12/12/2011 Date calculations using 'out-of-the-box' functions

Products

  • Acrobat
  • Creative Cloud
  • Creative Suite
  • Digital Marketing Suite
  • Digital Publishing Suite
  • Elements
  • Mobile Apps
  • Photoshop
  • Touch Apps
  • Student and Teacher Editions

Solutions

  • Digital marketing
  • Digital media
  • Web Experience Management

Industries

  • Education
  • Financial services
  • Government

Help

  • Product help centers
  • Orders and returns
  • Downloading and installing
  • My Adobe

Learning

  • Adobe Developer Connection
  • Adobe TV
  • Training and certification
  • Forums
  • Design Center

Ways to buy

  • For personal and home office
  • For students, educators, and staff
  • For small and medium businesses
  • For businesses, schools, and government
  • Special offers

Downloads

  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2012 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy Policy and Cookies (Updated)

Ad Choices

Reviewed by TRUSTe: site privacy statement