Posts Tagged Native Extensions
AIR 3 MapView Native Extension on iOS
Posted by Mark Doherty in Flash Player on September 15, 2011
For quite some time I’ve had my Radar application out on the Android Market, but one of the major annoyances was that the Google Maps component didn’t work on iOS. So I could never release the application for that platform, despite many “attempts” to get it working.
With AIR 3 we have new feature called Native Extensions, so I asked one of our great Engineering team called Meet Shah to look at this problem and see if we could expose native UI components within an AIR application. It turns out that Native Extensions don’t just give us the capability to access APIs like Notifications and Bluetooth, but to actually present native UI within our apps.
The goal is to finish the Native Extension for Android, iOS, Playbook and Desktop platforms and then release the code. Meet decided to follow the current (deprecated) AS3 API for Flash so that your existing applications will continue to work ongoing, great idea!
AIR 3 Native Extensions
Posted by Mark Doherty in Adobe Mobile Client, Creative Suite 5, Flash Player, Mobile Content on September 7, 2011
Yesterday we pushed out the first Release Candidate of AIR3 and Flash Player 11, and with that, we’ve outed another new feature of AIR – Native Extensions. This represents a further opening up of the Flash Platform in that you will finally be able to add new features to the runtime.
History of Native Extensions
The origin of Native Extensions actually goes back all the way to Flash Lite in 2005 and were in fact part of my first engineering project at Adobe. Back then we had the idea to enable a man machine interface (MMI) to the Flash Lite runtime to enable complete device interfaces to be built in Flash, the Samsung D600/D900, LG Prada, LG Cookie etc were the result of that effort .
The feature later evolved to become part of an OEM runtime called Adobe Mobile Client which was integrated into the BREW MP Platform to enable low-end devices to be produced with advanced interfaces and at much lower cost.
More recently we started working on “StageCraft”, the code name for a project to bring AIR/Flash support to the TV ecosystem. With the first iteration it was apparent that remote controls were all different, it would be impossible to create a completely consistent API for all of the various pieces of consumer electronics out there. With that, Native Extensions were reborn and redesigned to enable OEMs to build these custom APIs with ease.
Which brings us to today’s announcement, the opening of the Native Extension feature for all to use.
What are Native Extensions for?
From a high level this feature enables you to:
- Achieve deeper integration with target devices
- Incorporate legacy native code in your applications
- Achieve maximum performance for critical code
As I see it, we built the Native Extension feature originally to enable access to platform or device specific features that don’t form part of the platform today. Just to give you some context here, we always have debates about adding new features in the runtimes, many are community sourced, some OEM focused and some are internal like Flex etc. Imagine what happens when the Acrobat, Photoshop and Runtime engineers are free to finish their pet projects
Here are some thoughts on deeper API possibilities for devices today:
- Notifications
- Gyroscope
- Bluetooth
- Advertising
- NFC / Payments
- USB Accessories
- Media FX/Encoding
- Text to Speech
- Contacts
- Calendar
- Alarms
Of course let’s not ignore the various possibilities that are now open for desktop developers that want to access provide new interfaces for legacy products.
The benefit is that now customers conversations shouldn’t end with “Can you support XX with AIR on XX platform?”, from this point on the answer will always be yes, assuming you have the technically capability to implement it, or can acquire the extension from someone who can.
Using a Native Extension
From Actionscript, the use of an already built Native Extension couldn’t be simpler. In the example below you can see the first iteration of the Native Extension that I’ve been creating for Android Tablets with multiple displays.
import flash.external.ExtensionContext;
if(!extensionContext)
{
extensionContext = ExtensionContext.createExtensionContext("com.android.MultiDisplayInfo", "");
return extensionContext.call("getInfo","getCount") as int;
}
Get Started
