We’re excited to attend Adobe MAX 2011 in Los Angeles and to showcase Cassandra Stand with the optimizations and new features we have introduced targeting latest Sony tablets for the Adobe AIR App Challenge. The new AIR 3.0 adds a lot of amazing features and, among them, AIR Native Extensions simply rock! You can easily and fully integrate your AIR apps with underlying os, adding new features not provided by default in the SDK.

We spent last couple of days creating a set of simple projects to let anyone get started with AIR Native Extensions on Android. Currently you can visit our github repository located at:
https://github.com/mr-archano/Android-AIR-Extensions
Actually you can find three simple-but-useful little extensions, which allow to use Android native facilities for:
- sharing content
- send SMS
- show a Toast message
All you have to do in order to see them in action is to grab the AndroidExtensions_Demo Flex Mobile Project, follow the build instructions provided in README.textile and… enjoy!
Note: Below you can find the APKs of the demo application:
- AEDemo.apk (1,4MB): requires AIR 3.0 RC for Android runtime installed on your device.
- AEDemo_captive.apk (10.1MB): includes AIR 3.0 RC for Android runtime.
If you want to learn more about AIR Native Extensions check this page of Adobe Developer Connection:
http://www.adobe.com/devnet/air/native-extensions-for-air.html
You can find an exhaustive set of tutorials, technical articles and a list of ready-made NE, including this project.








[...] SSD: AIR Native Extensions rock! [...]
Supper
Thaannks
[...] In the last days we work with new cool Adobe AIR native extensions. If you use Adobe Flash Platform to create your Android mobile applications read our articles on: http://www.smallscreendesign.com/2011/09/29/air-native-extensions-rock/ [...]
Can the share be used with pictures? If so, any examples?
Actual version of the share extension supports only text/plain MIME (including links). BTW the basecode can be easily extended in order to add the image sharing feature.
Supposing that you have the path of the image to be shared (taken in your AIR/Flex application somehow), all you need is to provide that path to Android-side of extension, and set the extra of the sharing intent accordingly (take a look here http://stackoverflow.com/questions/3553017/android-share-via-dialog).
In addition some change must be introduced in AS-side of ANE, changing
the signature of the current share function, or maybe adding a new specific function for that.
I hope my answer is clear enough
I think this is a simple and useful feature, and I will add it into the next update.
Thanks, that would be great! Basically in my app I do a screen grab and right now save it to the camera roll but it would be nice to share it right from the app.
Another question is how can I make use of these extensions within Flash Pro? Hope that there is an easy way, I haven’t made the leap to Flex just yet and the app I built is currently all in Flash Pro CS5.5. Native extensions (share & toast) and ability to make captive app would be sweet but I can’t seem to find info on how to do this.
Cheers
Hi Matt! Yes, like stated before, if you have the path of the image it would be easy to share it via Android native facilities.
Unfortunately I have no clue about using ANE in Flash Pro, so I can’t give you any advice about that
BTW now that ANEs are officially out, I guess someone will come out with a tutorial or an official announce in the next days…
For now, you can try asking stackoverflow.com gurus or Adobe user forums. Consider to switch your workflow using Flash Builder too: it’s very straightforward and there is plenty of resources and tutorials about that
Hi,
I created a video tutorial illustrating the proces in Flash Professional. It combines the process of overlaying the AIR3 SDK, creating a project using gyroscope native extension and compiling with ADT, installing the app on my iPad using Xcode Organizer. Hope this helps somebody!
http://www.sworl.be/air-native-extensions-in-flash/
My blog has all the links to downloads and help pages parameters.
Nice work on the ANE!
In addition to images, could it be used to send to email/dropbox etc. ANY type of file passed into it? That would be awesome. I currently have to use a remote server to create the e-mail with attachement. This would eliminate that need entirely.
Keep up the good work!
I need too!
Well, I can’t be confident about the feasibility of what you’re asking… A “general purpose” attachment needs a little more experimentation on Android side. We’ll see
Any plans to make extensions to allow access to the contacts list?
The current feature set provided by this project will not be extended soon. But giving the user the access to own contact list will be an awesome extension for sure
Hi,
I have just release a blog post about creating a NativeAlert extension for AIR. It includes multiple buttons and dispatches ActionScript events when the user selects one of those buttons.
the post can be found here.
http://www.liquid-photo.com/2011/10/28/native-extension-for-adobe-air-and-ios-101/
The source is on github and you can download the NativeAlert.ane file directly also
Hope you guys like it.
Nice work Anthony!
[...] got pointers in (mostly) the right direction from here, here and here. But I was still struggling with how to use FlashDevelop to get the compilation of java [...]
Great Posts…
[...] Every now and then we choose webpages that we read. Listed below are the latest websites that we choose [...]……
Hi, great work here. I’m actually looking for an ANE to connect to the music library on Android. Any experience? Thx.
Hi Martin!
Could you please DM us to info (AT) smallscreendesign.com?
We can carry on the discussion privately.
Thanks,
Leo
Toto, Nice Work on ANE. I have one problem with this sample. When I compile ane by using build_ane target as dependency for build_apk, the sample does not work on 64-bit windows 7 machine. If I use the library which is shipped with your source, it works.
Please help me out. I am struck.
correction: I am build for Android from a Windows-7 64 bit machine.
I also faced issues that ANE file build on my machine(Windows-7) was not working
Solution:
In build.xml Replace
with
It worked for me
I also faced issues that ANE file build on my machine(Windows-7) was not working
Solution:
In build.xml Replace
basedir=”${ANDROID_DIR}/bin”
with
basedir=”${ANDROID_DIR}/bin/classes”
It worked for me
Pretty great post. I simply stumbled upon your weblog and wanted to say that I have truly enjoyed browsing your blog posts. After all I’ll be subscribing on your rss feed and I am hoping you write again soon!
I downloaded the apk but when I run it on mobile I don’t see the share image option. Is there a newer version of the apk present that has the share image sample?
Hi VivD. Unfortunately there’s no updated apk with this feature, but you can use last sources on github (https://github.com/mr-archano/Android-AIR-Extensions) and build your own apk.
Thanks for your response. I downloaded the code and imported the project folder (AndroidExtensions_Demo) in Flash Builder 4.6, changed the air version to 3.1, changed the flex compiler to 4.6 as that is what I’m using and ran it on the device.
However, when I clicked on Share Text button, I got the error below.
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.ssd.ane::AndroidExtensions$/get context()[/Users/anto/git/Android-AIR-Extensions/AndroidExtensions/src/com/ssd/ane/AndroidExtensions.as:158]
at com.ssd.ane::AndroidExtensions$/shareText()[/Users/anto/git/Android-AIR-Extensions/AndroidExtensions/src/com/ssd/ane/AndroidExtensions.as:48]
Not sure why this is occurring. Are there any additional steps I should carry out for this to work?
I am using flash pro and able to get toast working but the shareimage doesn’t seem to work. I save an image to camera roll and then use the file path of the most recent image to throw into the shareImage. The path that comes back is correct but nothing happens.
Just trying to get the simplest share example working by calling:
AndroidExtensions.shareText(“My Subject”, “My Text”, “Share:”);
Cannot seem to even get that working. The Toast is working and I have used that for a while now in the app so I know the ANE and component file are all in the right places. Is there any special permission I need to request?
Hi Matt, sorry for the delay (I missed the mail notification about your previous comment). The only permission you have to set is internet persmission.
Thanks for the reply. I had that permission for another native admob extension. Still can’t seem to get the share function to work. Is there anything Flex specific that would hinder it from working in Flash? Calling Toast works like a champ but share doesn’t (text or image).
I would be willing to pay for an extension that did image sharing and file sharing in Android.
Matt, there’s no Flex-specific stuff required by the ANE. Unfortunately I have no experience about ANE+Flash Pro.
Do you get any error in the flash console? A sort of log could help…
As a side note: do you use a device or the desktop emulator for tests?
We could go private for further investigations: please drop an email at toto(at)smallscreendesign.com
Thanks for the offer but realized my mistake. Had the old ANE in the ADT compile directory (actually had both old and new). Deleting the old made it work.