January 15, 2009
Reflections on doing Android development
Some time ago after playing with the Android development API and environment I posted that Android looked good from a developers point of view. After completing the first beta port of QuickConnect to Android I would like to revise that opinion.
The development environment, an eclipse plugin and the emulator, is very unstable. Not only does it cause my machine to freeze up regularly but sometimes it doesn’t even work correctly. For example, when i start eclipse and run my application for the first time in the emulator it fails, every time, to actually install and run the application. So I then I run the application again and instead of using the existing, running emulator it starts another. I then have to quit both emulators and run again. Now the application runs.
If this were all I could easily overlook the environment problems but I now have a much bigger issue. I used the function keys to rotate the emulator to a horizontal position. Now every time I run my application it crashes before it even gets to my code. I have rotated it back, quit both the emulator and eclipse, and even rebooted 3 times. It still crashes. This is with ZERO code changes from when it was working. This seems to be, in general, how the development environment has been to work with. When it does work it is fine but eclipse crashes, freezes my machine, somehow gets in infinite loops, based on listening to my CPU fan, and the emulator is very buggy.
Now to the API and google’s Java Virtual Machine.
Exceptions are not handled well at all. The VM will crash the application instead of throwing Exceptions sometimes. When the events are thrown they sometimes have messages associated with them that are retrievable via the getMessage method and sometimes they don’t. Pattern? I’ve seen none with either of these behaviors. If you are going to roll your own VM it had better be rock solid. Obviously this one is not.
When I first started trying to write code to record audio I didn’t realize that you had to store all files such as these on an sdcard. When you try to write to the native memory using the MediaRecorder it allows you to make the call and then goes into an infinite loop of reads. The log file shows this clearly since read errors are reported infinitely. Hmm….. Maybe this should not be the behavior. By the way, I got the same behavior if I tried to store the audio in a directory on the sdcard. Additional by the way. You have to programatically create a fake sdcard on your machine and then tell the simulator to use it. The creation is uses tools outside of the eclipse plugin.
All in all I have to say that the experience has been quite painful. This becomes especially true when I compare it to my experience in using Apple’s tools to develop iPhone apps. Even taking into consideration the difficult app signing apple developers have to go through.
Google, if you want to maintain your good buzz with developers maybe you should stop hitting them in the head with bad tools like the ones you have produced here. Could it be that you just released it to try and maintain some sort of market share even though it was very far from ready? It seems likely.