Idea for a Cool AIR Application

I often get ideas for things to build but don’t have the time to actually see them through. Recently I came across an API for accessing the Android Marketplace that was written in Java. Google has no official API for this as you are supposed to only be able to access it from your device. The idea was to build an AIR application that would allow you to search and browse on the market. There are many websites out there that do it but they are messy and riddled with ads. This would be clean, fast, and could include advanced features like directly connecting to your device.

I started by trying to port it directly to AS3. This was going great until I had to set a cookie header with the authentication details when querying the market. This is not allowed in ActionScript and I could find no workaround. A proxy on my web server could work but this is for an AIR application. Next I decided to simply call to the JAR file using the AIR 2.0 NativeProcess API. This worked great and I was able to get results returned. The issue then was that it seemed to be badly formed JSON. The JSON library in as3corelib kept giving me errors so that is where I left it.

If someone out there is looking for an idea for something to build, I think this would be a great app that would garner some attention. Make sure you send me the URL when you’re done. Below is the code I was using to interact with the JAR file.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
private var np:NativeProcess;
private var npi:NativeProcessStartupInfo;

protected function windowedapplication1_creationCompleteHandler(event:FlexEvent):void
{
    np = new NativeProcess();
    npi = new NativeProcessStartupInfo();
    npi.executable = File.applicationDirectory.resolvePath("C:/Windows/System32/java.exe");
    var args:Vector.<String> = new Vector.<String>();
    args.push("-jar");
    args.push(File.applicationDirectory.resolvePath("androidmarketapi.jar").nativePath);
    args.push("YOUR_GMAIL_ADDRESS_HERE");
    args.push("YOUR_PASSWORD_HERE");
    args.push("SEARCH_TERM");
    npi.arguments = args;
    np.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA, onData);
    np.start(npi);
}

private function onData(e:ProgressEvent):void
{
    var str:String = np.standardOutput.readUTFBytes(np.standardOutput.bytesAvailable);
   
    if(str.indexOf("app") != -1)
    {
        str = str.substr(str.indexOf("app"));
        var obj:Object = JSON.decode(str, false); //FAIL
    }
}

New Video Tutorial on AIR for Android (Part 1)

I just uploaded the first tutorial in a multi-part series on developing AIR applications for Android. In this first tutorial I explain how to get your development environment setup and how to create and load a simple application onto your device using Flash CS5. Future tutorials will cover topics like using the emulator and performance optimizations.

Lee


Win An Ultimate Android Developer Kit At FITC Toronto

I leave tomorrow for FITC Toronto and this is looking to again be a great conference. Luckily the volcano cleared up just in time so the European crew should make it. As part of the conference I am going to be doing another dead drop. If you’re familiar with the dead drops you know that you can expect anything. The prize for winning for the dead drop is a complete development kit for building AIR applications for Android. First you will get a copy of Master Collection CS5 as soon as it hits the streets in a couple of weeks. In addition to that you will also receive a brand new, unlocked, Google Nexus One phone so you can start building apps right away. The final part of the prize is the most important as you will be added to the AIR for Android private beta program.

Lee


Google Reinforces Commitment to Adobe and Flash

Update: there are a bunch of other applications listed over on the official Adobe AIR blog.

This morning Andy Rubin, Google VP of Engineering, made a guest post on the Adobe Featured blog that clearly states the commitment Google has to bringing Flash and AIR to Android-based devices. Here is a quote from the post:

“Google believes that developers should have their choice of tools and technologies to create applications. By supporting Adobe AIR on Android we hope that millions of creative designers and developers will be able to express themselves more freely when they create applications for Android devices. More broadly, AIR will foster rapid and continuous innovation across the mobile ecosystem.”

I can’t tell you how refreshing it is to hear something like this. Google wants creative professionals to be able to target the Android platform and at the same time they are not trying to prevent those same professionals from targeting other platforms.

In other Android news, developers in our private beta program continue to churn out applications at an impressive rate. Many of them have shot videos of their work so far. Below are some links for you to check out.

Chroma Circuit – Blog | Video

Qrossfire – Blog | Video

Gold Strike – Blog | Video

Fruit Smash Organic – Blog | Video

BaoZi Jump! – Blog | Video

Happy Peg – Blog | Video

StarMatchABC – Blog | Video

Digit Cards – Blog | Video

Tiny Dot Edit – Blog | Video

Slots O’Luck – Blog | Video

Mingoville Sudoku – Blog | Video

First Aid – Blog | Video

StudyShuffler – Blog | Video

Innocent Angel – Blog | Video

Lee


Great AIR for Android Example – Easy and Speedy

We have only had the AIR for Android private beta open for a couple of days but already developers are rapidly creating cool games and applications. Jobe Makar, the lead developer at Electrotank, has posted his thoughts on the ease and speed of development as compared to his experiences with the often-painful Apple processes. He has posted a couple of videos of a game that he was able to port to Android in a few hours, and that “includes downloading and installing the SDKs, walking through a Hello World tutorial, charging the device for a little while, and making some minor code edits”, said Makar.

Expect more and more testimonials like this as the beta gets out to all developers. We are able to get tremendous performance on Android devices because Google and the various handset manufacturers have chosen to work closely with us to provide the best possible experience to the end user. Go Android!

Lee


1 - 5 of 52 Prev 5Next 5