January 15, 2009

Reflections on doing Android development

Posted in Android Development tagged , , , , at 8:52 pm by tetontech

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.

Advertisements

3 Comments »

  1. commonsguy said,

    Have you filed bug reports with the details of the symptoms you are seeing?

  2. esbium said,

    Part of the problem is Eclipse. While lots of developers use it and it can be stable, I have had similar experiences with it. I switched to Intellij for all my Android development and have never looked back. Sure you don’t get the ddms tool integrated and hot swapping but I will take a slightly more manual process over tool crashes any day of the week. Try intellij with the build file that the android sdk generates for you. It works and Intellij is rock solid IMO. There is an android plugin for Intellij but it doesn’t work with 8.x and even with 7.x it was sub par. I don’t even use a plugin anymore, I don’t really need to.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: