Native Extensions: A Simple Guide

We've been doing a lot with Native Extensions for AIR lately, both in Android and iOS, and I just wanted to put together a quick "how to" on using other people's Actionscript Native Extensions (ANE) in Flash Builder 4.6.

I'm going to assume you already understand the process of developing and deploying mobile applications using AIR.

The process is quite simple, you'll need the supplied ANE for the extension. In your mobile project you want to add it into, open up the project properties (Right click / Properties) and find the "Actionscript Build Path" (or "Flex Build Path" if it's a Flex project).

You'll see a tab up the top labeled "Native Extensions" in which you can "Add ANE...". Click on this and select the ANE extension file. Once it's added in, you can expand out the details of the extension to see the target platforms supported by the extension. Below I'm showing the details on our Android Camera Extension.

The extension is now included in your project, however before you leave here I suggest you go to the "Build Packaging" for the platforms you are deploying and check the extension is going to be packaged (and available) with them.

You should now be able to return to your code and use the functionality and classes supplied in the extension, hopefully you've been supplied with documentation or example usage of the extension!

Published by


19 thoughts on “Native Extensions: A Simple Guide”

  1. Does your set of Adobe AIR Native Extensions for use with iOS and Android mobile platforms support the GCM push notifications, now that C2DM is defunct?

    1. Hi,
      We are currently in the process of updating our Push Notifications extension to support it. Should be available within a week. We’ll update the site when it is.

  2. It would be great to get a walkthrough for Flash Proffessional CS6… Not everyone uses Flash Builder/Flex… in fact, Flex code runs slower, so many games are built with flash pro and an external text editor.


    1. Hi there,

      We’ve got some more tutorials in the works and will be published in the coming weeks. CS6 will be one of the topics covered, along with using Windows and the ANE’s on iOS.

      Stay tuned…

  3. Could you update the map demo available in android market? I am interesting on moving to google maps but i want to give it a try on kitkat.thanx

  4. Hi Michael,

    When trying to build and run a project with Facebook ANE i get the error below, can you please tell me what have i done wrong? (other ANE are working ok):

    Error occurred while packaging the application:

    aapt tool failed:C:\Users\Lior\AppData\Local\Temp\2d2b6265-8615-4899-ba4d-8a333687f683\app_entry_res\values\strings.xml:19: error: Resource at app_version appears in overlay but not in the base package; use to add.
    C:\Users\Lior\AppData\Local\Temp\2d2b6265-8615-4899-ba4d-8a333687f683\app_entry_res\values\strings.xml:20: error: Resource at button_install appears in overlay but not in the base package; use to add.

  5. Hi,
    I tried your compass with FB4.7 & Iphone 5. The ANE was integrated and the swf opened up at the phone so I just can see there is some kind of image whereafter it shuts down. No error messages. In debug mode just “TestCompass” comes up and the app is terminated. Where to go from here?

    1. Hi,

      Make sure you’ve added your developer key correctly, that the extension has been marked as being packaged in packaging settings and that you’ve linked it to a recent release of the iOS SDK.


      1. Yes, indeed I got the compass to work. But the application stresses the battery and the system. Is it possible to set the interval for the sensor readings?

Leave a Reply

Your email address will not be published. Required fields are marked *