Android AIR Bridge

This is a quick demonstration of the Android AIR Bridge I have developed. The bridge works using socket communications together with AMF serialisation/de-serialisation. It builds on and adapts projects such as MerapiBlazeDSGraniteDSApache Commons and Apache Harmony.

I believe this opens up all functionality on Android to AIR applications and in fact allows you to develop fully mixed Android and AIR applications.

The demo video above showcases this two-way communication between Adobe AIR and the Android Voice Recognition functionality using the Motorola Xoom.

A button click on the AIR side results in the Voice Recognition service being activated on the Android side. The result from the Voice Recognition gets passed back into AIR which then uses it to make a remote service which allows me to create an intelligent response and play it back as audio.

If you want to get started with developing mixed AIR / Android applications then a great place to start is this superb article by James Ward on Extending AIR for Android . In this article he concludes that adapting the Merapi project to work with Android would provide a better bridging mechanism.

I thought that getting that working would be an interesting garage build challenge and that is what you see working in this demo. For any of you interested in experimenting with or using it,  the code for the bridge is now available to check out at  http://code.google.com/p/android-java-air-bridge/.

Advertisements

4 comments so far

  1. Renke Kunst on

    Hi. Super cool. Could you please share an example code for learning how the bridge will be implemented into a project. And how bring you the air and the java together in one apk-file? i want to connect a bluetooth device to my android air application.

  2. javadz on

    Okay I have created an example that is made up of an Android project and an AIR project. The AIR projects build path is the assets folder of the Android project. So actually the project you are creating the apk file from is the Android one – it happens to contain the AIR application as an asset. I have posted these two project to the new examples folder which you can check out at http://code.google.com/p/android-java-air-bridge/.

  3. Jason on

    I got your example working on my device, but when I try to swap out the AIR app you had with a Flex Mobile app under the assets folder, I updated the application.xml to the correct information etc. The app fails and never runs I don’t get any errors either. Any ideas? I would like to integrate in the voice recognition stuff into a Flex Mobile app I am writing, both are on AIR so should work fine right? Is there something I am missing?

    • javadz on

      I haven’t tried it as a Flex Mobile application but I would imagine that your issue may be that your project needs to be based on s:Application.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: