There's (about to be) An App For That
Mon, 2010-04-26 19:56 — steve.mcdonald
I have been considering getting into Android smart phone development for a while now. I have been waiting for Adobe Creative Suite 5 for a while now and have been imaging that I would build application in Flash+AIR for Android. I am still convinced that this what I am going to do, but the tools are not available yet. So, this weekend I picked up a great new book called "Beginning Android 2" by Apress. This book explains core Google Android 2 development but they use hardcore command-line tools (ubber-geek) to create and compile the project into an Android APK app. I love geeking out, but I don't want to become nor have I ever been a command-line geek. So, based on what I read about the Android Developer Kit and the Eclipse Plugin, I decided to "google" a tutorial on setting up Eclipse to build Android native applications... 20 minutes later I built my first application!
The coolest bit is that you can create Android virtual devices which runs the Android opperating system. Even cooler is that you can target versions of the Android OS previous to the most cutting edge version (Android 2.1) and test your app under all of them. And once you setup your application and you are ready to sell it in the Android marketplace, you can decide that it only targets Android 2.1 so that people with older Android devices won't even see it in the marketplace if they are crusing the marketplace from their older device. It seems like a really solid ecosystem as a result.
More on this first application: if you have ever built an application in a programming language, the first lesson is always super simple and about printing the words "Hello World!" to the application canvas. This is basically what I have done here. Developing apps for Android is very much like building a Flex application in that you have code in one file and the interface is basically an XML file outlining different components (or "widgets" in Android) describing how they should appear on the screen and what code to run if the user interacts in a certain manner with the interface. In the case of this example, it is dead simple. I basically created an instance of the TextView widget and assigned it the value "hello, Android". Then I basically made the TextView widget take over the entire interface!
Yeah, I know. It really isn't interactive. But... it is the first app, and soon, whatever ideas for apps I come up with, then there's about to be an app for that!
UPDATE! Still this evening I thought up a common example of interaction to see how difficult it would be to easily pull off. The basic goal was to provide a window that prompted the user to enter their first name. Then they would hit a button that says "Say Hello!" and as a result it would call a function that would read the value they entered into the first name field and print that message out to another field, displaying a message like "Hello, Steve!" Ba-da-bing! It worked, and it was pretty easy. As soon as I learn to do something truly cool, I will have to publish a screencast that explains the whole workflow, from setting up Eclipse with the ADK Plugin to building something slightly more interesting than a "Hello, World!" application.
