How Does AIR Run on Android?

Must Read

Are College Dropouts Still Responsible for Student Loan Repayment?

Student loan borrowers make up over fifty percent of college students. Today's high cost of education makes it almost...

SimCity for the iPhone Review

The publication of The Sims has completely changed direction from SimCity. As for the latter comparison is the old...

Black Friday Myths Exposed

Only a few days until Black Friday and the excitement is building rapidly. We've already seen some of the...

Action: Tomorrow Never Comes – Affiliate Marketing Guide

You have done your research. At first you were probably overwhelmed with information, but now you what article marketing...

How to Do Your Christmas Shopping?

Christmas shopping can be an exhausting and time consuming activity. Whether you prefer to shop online and avoid the...

How To Find A Student Loan Consolidation Program That’s Right For You

Many people are now looking for ways on how to find a student loan consolidation program which would suit...

The packaging of an AIR application includes the compiled .swf file, any necessary assets, and bootstrapping code. A bootstrapper is a simple program that activates a more complicated one.

An AIR application starts as any native application. This mechanism is similar to that for AIR desktop applications. The bootstrapper, which is a small piece of Dalvik (.dex), checks to see that the AIR runtime is installed. If it is not, it directs the user to get it.

The bootstrapper loads the Runtime library and invokes it, passing it to the application’s main .swf file. If more than one AIR application is running, the mechanism manages a shared copy of the runtime for all of them.

In some cases, code from the Runtime library also invokes OS functions in Dalvik, the Android virtual machine, and makes Java Native Interface (JNI) calls. It becomes a broadcast subscriber for the specific events related to the application’s permissions. It also interfaces with the system for screen display and input events such as gesture and keyboard inputs.

Starting AIR with intent

In the Android environment, applications or the browser can launch other applications and pass arguments to them. An application can receive arguments even if it is already running.

At the time of this writing, AIR applications cannot launch other applications, but they can be launched by others and capture arguments. To test this, install the Android

Advanced Task Killer, a free application for listing running applications and then killing them, or making them active.

If your AIR application is launched by a native application, you can listen to the Invo keEvent.INVOKE event:

import flash.desktop.NativeApplication;
(InvokeEvent.INVOKE, onInvoke);
function onInvoke(event:InvokeEvent):void {

Android development using Java is beyond the scope of this book, but this is what launching an application using intent would look like:

myIntent.setClassName(“air.NAME_APP”, “air.NAME_APP.AppEntry”);

AIR Access to Android APIs

The biggest limitation with AIR for Android at the time of this writing is that it cannot issue Android system notifications (such as notification bar updates), or communicate with other applications. There is also no widget support.

Some experiments have been done to try to overcome this and create a hybrid AIR Java application for Android. Create two APK files, one with the Android SDK and one with the AIR SDK, then merge them together.

Set up a mechanism such as a network socket for the two processes to communicate at runtime. The ip and port must be the same. AIR sends messages over sockets to Java to show notifications.

This is not public, nor is it official (at the time of this writing). Expect to read about some developments regarding this, as there is great interest among the developer community for AIR to offer the same (or similar) features to native applications.


Latest News

Digital Marketing for Beginners

Digital marketing for starter, Let to basic learning about connecting with your audience in the right place at the...

What are 7 things poor people do that the rich don’t?

1. poor people watch TV in which people read books how many hours you spend in front of the TV and when was the...

Top 18 best small business ideas for beginners starting

A small business can be frightening and requires plenty of careful planning there are many small business ideas which can be beneficial as well...

Summer that makes you happy

We saw were already here I've been thinking about some of the things. I used to do with my husband even though he had...

4 Point to helpful tips specifically for caregivers

What you need to take a vacation. I know it sounds impossible creative and try to make it work for you almost everyone needs...

More Articles Like This