Android Development - Snake game

by Marya Doery, Wednesday, February 15, 2012

For my latest project, I'm developing an Android app. And I find Android development to be a constant struggle - I'm just not in the groove yet.

This morning I started the Android emulator from eclipse. When I tried to load my app into it, I got the message "connection with adb was interrupted, and attempts to reconnect have failed". I searched for a solution - the most likely culprit was the firewall. Except, I had loaded the app in yesterday without problems. So I shut down eclipse and restarted the emulator. Mysteriously, the problem had vanished and everything worked fine!

Later I had more problems attaching an app to the emulator. This time, I had to delete the associated AVD (Android Virtual Device). I even couldn't delete it from eclipse. Its files had become locked, and I had to delete them manually.

I was messing around with the Snake game which comes with the Android SDK. I wanted to install it on my tablet. To do this, I had to fiddle with AsusWebStorage to sync up files between the desktop and the tablet. AsusWebStorage is a great app, but it took me a little while to figure it out again. Then I found the Snake game doesn't work without a keyboard, so I was finally forced to open my Asus docking station, which was still in its box. Then I had to figure out that you must remove the little rubber stoppers that plug the docking ports in the Asus tablet, otherwise you will never be able to dock the thing. It turns out you can stab the end of a paper clip into those little tiny holes and drag the stoppers out. I didn't check the manual very thoroughly, but I didn't see any mention of these stoppers or how to remove them... I found the solution online.

rubber stoppers cover docking ports on Asus tablet

Anyway, I was finally rewarded by being able to play the game on my device, instead of in the emulator. The problem is that the game responds to keypresses from the arrow keys, but doesn't rotate and is only displayed in portrait mode. So your keypresses don't correspond with the direction that the snake turns. Oh well! It was pretty cool finally seeing the game in action on my tablet. Here's hoping I'll get in the groove tomorrow.

snake game on Asus tablet