Friday, January 2, 2009

My First Android App

I wrote my first application, a Tetris clone, for my new T-Mobile G1 phone. The phone runs Google's new Android operating system. A few years ago, I wrote a version of Tetris in Java, which can be found here. Android apps are also written in Java, so it didn't require significant change to adapt my game to the phone. Writing applications for Android was surprisingly easy after everything was configured. Google provides a wealth of information for getting started on writing your own Android applications.

Once you have Eclipse configured, you can easily compile and run your applications with the click of a button. When you run your application, you can choose to run it in the Android Emulator or if you have your phone plugged in via USB, you can run it directly on your phone. For the latter option, you do not need a special developer phone, you simply enable USB Debugging on your phone. Very easy!

The Android documentation is similar to the Java API reference and very easy to use. Google has also provided a number of sample programs and source code. Additionally, quite a few of the Android apps are open source. With so many free apps on the Market already, it'll be interesting to see what companies can come up with once apps are sold on the Market. However, there is still a huge market for games. With the exception of a few, most of the free games are fairly simple, and none of them take advantage of the 3D capabilities of the phone.

Feel free to download my Tetris APK. Roll the ball up to rotate blocks, then roll left and right to move blocks as they fall.

0 comments: