Put on your favorite self-pitying emo music and get ready for some developer frustration. I’m running down the top 10 things I love to hate about Android.
1. Open Source
Leave it to Google to place all the code for their handset platform in the hands of the masses. Not only does this mean anyone can download and roll a new version of their phone firmware, but it also means absolutely any maker can roll its own Android device. I’m looking forward to an Android-powered toaster oven any day now. What’s worse is Google knows how to protect valued code; Its Maps, Gmail, and Store applications aren’t open source. Figuring out when it’s okay to include one of those in your own application requires a crack legal team with a hotline to the EFF. This is the most benign on this list, and it’s only here because now everyone and their brother is going to make a new “Android-powered” device.
2. The Tyranny of the Activity
Through the Activity, Android forces developers to build apps in smaller, bite-sized chunks. For example, in their sample text editor code, they have one Activity for picking from a list of editable files and another Activity for actually editing a file’s contents. Android also encourages developers to communicate among their Activities using Intents (more on why I hate those later).
This design would be dandy for mobile software except for one thing: exactly no one else works this way. J2ME, the iPhone, BREW, and Blackberry all work with the notion of a centralized application object (The Blackberry/J2ME Midlet or Brew’s IApplet). Android, by contrast, pushes you to design everything as small, self-contained mini-applications. This decision leads to some really interesting behaviors. By default, for example, when a user rotates the screen or pushes the keyboard out, Android destroys the current Activity and then recreates it.
In the end, professional mobile developers are left with two options:
- They can design their software on other platforms to use the Activity/Intent model so that Android ports easily.
- They can hack, slash, burn, and duct-tape Android into behaving like every other mobile platform does.
I suspect you, dear reader, can guess which direction this grumpy author has had to take.
3. Device Debugging
Back in my day (and by “in my day,” I mean two years ago), debugging on the handset was a trying proposition at best. I’ve written my own logging systems for J2ME, relied on beep codes to tell me if code had been hit under Brew, and lost sleep wondering if a particular log line was really the last log line to be rolled over before a crash. Google, curse their cotton socks, has quite literally taken a process that used to involve hours of work and reduced it to simply pressing F11. Not only is it straightforward and easy to use, but it also works on every platform out there (Mac, PC, and Linux).
Why do I hate this extremely useful tool? I hate it because it makes about 40% of my debugging skills nearly useless! Next thing you know, Google will enable anyone to design a mobile app UI using nothing but XML… oh wait.