Developing Android Applications with Adobe AIR [20]
For more information, read http://blogs.adobe.com/cantrell/archives/2011/03/air-2-6-applications-and-the-amazon-appstore-for-android.html.
Controlling Distribution by Using the MAC Address
You may need to develop an application that is only authorized to run on some devices. You could upload it to a server and give the URL to a selected group, but this method is not very secure.
To monitor installation, use the MAC address of the device. The MAC address is the unique identifier for the hardware, mobile device, or desktop.
First, set the Android permissions to have access to network information:
To obtain the address at runtime, use the NetworkInfo class, which gets a list of interfaces and looks for a hardwareAddress. It is the MAC address for your device:
if (NetworkInfo.isSupported) {
trace("network information is supported");
}
var network:NetworkInfo = NetworkInfo.networkInfo;
for each (var object:NetworkInterface in network.findInterfaces()) {
if (object.hardwareAddress) {
trace(object.hardwareAddress);
}
}
The address looks something like this:
00:23:76:BB:46:AA.
Launching an AIR Application
The first time a user launches an AIR application, the Adobe AIR license agreement will appear. The user only needs to agree to the terms once.
If you are familiar with developing AIR applications on the desktop, you may have noticed a difference here. The installation warning dialog does not appear on the device. The messaging is handled by the operating system when the application is installed, as it is for native Android applications. Also, downloaded applications are stored in the /data/app directory which is a private directory.
Monetizing Your Application
Before you submit an application, you should become acquainted with other applications already on the Android Market. Visit the AppBrain website (http://www.appbrain.com/apps/) or the Android Market website (https://market.android.com) to see the current applications.
For reference, the website at http://www.appbrain.com/apps/popular/adobe-air/ keeps track of the applications developed using AIR.
Paid Applications
Setting up a merchant account with Google Checkout requires that you provide banking and tax information. You only need it for the applications you charge money for. Google’s transaction fee is 30% of the price of your application. The arguments for using the Android Market are security, efficiency, and exposure.
It is up to you to decide whether to charge for your application. Your history is public and available to consumers, so charging a fair price is a good long-term business practice.
Unlike Apple and the Apple Store, Google doesn’t force you to use the Android Market as a distribution channel. Instead, you can place your application on your web server of choice. Your server MIME type needs to be edited, however. The MIME media type for .apk files is application/vnd.android/package-archive.
To install an application on a device via a non-Android Market source, select Settings→Applications→Unknown Sources. Unless the application is properly documented, this may reduce your audience.
Mobile Ads
If you want to earn money from your work, you can offer your application for free but receive revenues from embedded advertisements. Read Arron La’s story on the revenue he made from his Advanced Task Manager application, at http://arronla.com/2010/08/android-revenue-advanced-task-manager/.
The advertisement displayed in your application is one image with a clickable URL. Here is a short list of some mobile advertising companies:
AdMob (http://AdMob.com)
Smaato (http://www.smaato.com)
Google (http://www.google.com/mobileads/publisher_home.html)