What the heck are AIR Native Extensions?
The quick explanation
With we released of AIR 3.0 we added this awesome new feature called native extensions. Trust me these are cool. Essentially, a native extension will let you extend the functionality of your AIR app so it can access the native capabilities of a device. So, by adding some native code you can:
- make a mobile device vibrate.
- change the channel on a TV
- read pressure sensitivity data from a pen table
The more technical explanation
A native extension is a combination of:
- ActionScript classes.
- Native code. Native code is defined here as code that executes outside the runtime. For example, code that you write in C is native code.
Here’s why you might want to write your own extension:
- A native code implementation provides access to device-specific features. These device-specific features are not available in the built-in ActionScript classes, and are not possible to implement using application-specific ActionScript classes. The native code implementation can provide such functionality because it has access to device-specific hardware and software.
- A native code implementation can sometimes be faster than an implementation that uses only ActionScript.
- A native code implementation allows you to reuse existing code.
When you have finished your ActionScript and native implementations, you package your extension. Then, an AIR application developer can use the package to call your extension’s ActionScript APIs to execute device-specific functionality. The extension runs in the same process as the AIR application.
An even more technical explanation
Here’s an architectural diagram of an extension:
Where to get extensions
Because you can package and reuse extensions, you don’t need to write one yourself. You can use someone else’s. We’ve even set up a handy page where you can find some extensions to get you started. These extension were contributed by both our in-house dev team and our community. Take a look.
If you’re interested in creating your own extension, we’ve created a whole set of content just for you. Check out the Native extensions doc here.
68 Notes/ Hide
- cora-green reblogged this from e-musings
- samsung-galaxy-tab-10-1-prix reblogged this from e-musings
- wie-werde-ich-hundetrainer reblogged this from e-musings
- welche-lebensmittel-senken-den reblogged this from e-musings
- shalandavillage40 reblogged this from e-musings
- kendrasite98 reblogged this from e-musings
- cna-certification-a reblogged this from e-musings
- okapitanmoikapitan likes this
- australblackbird reblogged this from e-musings
- e-musings posted this