I’m just so sick of writing programs on Android nowadays. I do Android development for a living, but I can say wholeheartedly that it is very very hard to make a good application for Android. Don’t get me wrong, it’s not like Android is not a good platform, it is a good free and open platform, but it’s half-baked. If any of you have been programming Android, you will usually find that some of the Android’s APIs are broken, some of them work differently in different versions, and some of them just don’t work at all. Normally, programming on Android is fine when you don’t have to touch a lot of lower level stuff, especially the Android Media Player. It is broken beyond repair. How can it not support streaming from an HTTPS URL? How can it deadlock itself when there’re two instances of it running at the same time? And remember that this comes from Google!! not from some b.s. company that we don’t know.
Also if you look at Google’s Android platform versions page, it shows you that most of the time, you can guarantee that the phones will run at least Android 2.1 (Eclair); however, you have to remember that this is only the statistics of phones that access Android’s Market. If that particular phone doesn’t access Android Market, it doesn’t get counted here. Personally, I have to write an application that supports Android platform since version 1.6 (Donut), sometimes it is really hard to make use of new features of the platform, but also make sure that I have a comparable feature for older devices. As you know, Android 2.2 (Froyo) added a whole lot of new features into the platform, such as AudioFocus listener, car mode, and night mode GUI, for instance. If we want to use those features in the application but still allow the application to run in the older version of the platform, we have to wrap all those features in our class, so Dalvik (Android’s JVM) doesn’t load that class up and that will prevent it from crashing. I suppose this is normal for Java development, but still for a mobile platform with a lot of different versions, we need to find a better way to do this.
There are also some good things about Android that if I don’t talk about will make Android looks like it’s born from hell. For instance, there’re a bunch of libraries that are available on the platform right away without the developers having to add them to the application. For instance, the JSON framework, Apache HTTP framework, or the XmlPullParser framework are very nice additions. Also, the way to construct layouts in Android is quite good if you have to work with different screen sizes. The XML is easy to understand and quite easy to construct once you understand it. If we compare it to construct a layout in an iOS platform, it’s a completely different approach. iOS uses Interface Builder that creates a serialized XML of the view that we’re constructing and it also has a visual designer. However, making an interface in Interface Builder could be challenging when having to work with multiple screen sizes and resolutions. There’re tradeoffs to both approaches and it’s up to you to decide which approach is your preference.
I can’t talk about Android development without talking about Eclipse. Google recommends Eclipse to be the platform of choice on developing Android application. However, Eclipse is NOT the best IDE out there. I found that when working with Java, Eclipse is a very decent IDE, but when trying to work with something else like XML, Eclipse just sucks. I couldn’t get Eclipse to do autocomplete when I’m constructing my layouts or my styles, even though sometimes it will show up. Personally, I’d recommend IntelliJ IDEA as an IDE to develop Android in. I know that there are license fees and IDEA might not have the “up-to-date” Google tools, but believe me, you will be much much happier working in IDEA than in Eclipse (especially when you’re working in a large project). If you’re interested in using IDEA with Android, you can take a look at JetBrain’s website, they’re integrating more and more Android support into their IDE.
There’re so many factors to make a good mobile application, but the platform itself is a very big factor in it. If Google cannot solve Android fragmentation and the problem persists for a long time, maybe the platform of choice to the user would be Microsoft Windows Phone 7, or the iOS platform, which are really good. (Windows Phone 7 comes with the best IDE and the best modern language at the moment, C#, and iOS comes with a very intuitive IDE + easy to use UI builder + a hugh support from other developers) Only time will tell who will win this competition.