// labs

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!

Written by Michael Archbold

January 17th, 2012 at 8:30 pm

Posted in tips

Tagged with , , , ,

Leave a Reply