Get rad!

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!


17 Responses to “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?
    Thanks!

    Reply

  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.

    Cheers!

    Reply

    • 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…

      Reply

  3. Any update on tutorials using these ANE’s with CS6 ?

    Reply

  4. may i buy any one extension? or i have to buy all of them to use one?

    Reply

  5. 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

    Reply

  6. 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.

    Reply

  7. 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?
    Sincerely
    Christer

    Reply

    • 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.

      Cheers

      Reply

  8. hi,
    Can i get the trail version of push notification before purchasing??

    Reply

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>