Android And iPhone Development Thoughts

I recently received a Motorola Droid from Google for signing up for Google IO 2010. Unfortunately not the incredible, but the droid is actually a nice phone. The screen is really sharp. The physically keyboard lets you type faster. It’s a little too early to say, but I might keep this phone over my iPhone 3g. Anyhow, I thought Android will become more common in devices other than phones, why not make a quick app to learn a useful skill? Since I have previous iPhone development experiment, I’ll give a brief comparison of different areas i prefer in developing native iPhone and Android apps.

Apps

I created two native iPhone apps(voodoo doll and tweet show) with a few friends a year ago. Both are free and relatively simple. TweetShow actually hit the “Featured” page when it was named “TwitterTime.” It lets you watch tweets hands-free(ie. if you are eating).

For Android development, i used the Android 2.1 sdk with Eclipse. Android lets you use any IDE or even develop in the console as all of the build tools are command line-based. I made a useful Android app called Pastedroid which allows you to copy a piece of text(address, phone number, etc) to your phone. With the Pastedroid app installed, users go to pastedroid.com or use the javascript bookmarklet, copy text there and it’ll appear in the pastedroid Android app. It’s more similar to pastefire on the iPhone rather than tapbot’s awesome and more full featured paste helper, Pastebot.

Development Comparison

UI: iPhone

iPhone’s built-in UI makes it really easy to make an app good looking and consistent. Android on the other hand makes it really easy to make a horrible looking app. The iPhone interface builder even lets you drag/drop elements whereas the Android doesn’t.
Android Eclipse has a strange interface builder. It’s easier to edit the XML directly but making it look nice is difficult. Editing Android UI feels like the pre-css HTML days where table tags ruled.

UI Interaction: Android

To connect a ui button to your code, it’s a multi-step process in the iPhone sdk.
In the interface builder, click and drag an outlet to its file owner.
Then in the header file, define the outlet:

@property (nonatomic, retain) IBOutlet UISearchBar* tweetSearchBar;

Then in the code file, i can use the object.

Developing interactions is easier on Android. Just name the button in the UI xml file and you can access it in the code using:

refreshButton = (ImageButton) findViewById(R.id.refreshButton);

To make an event call a method, just set the method handler in the XML UI file.

Documentation: iPhone

I tend to learn by examples and it was definitely an easier time to find iPhone help and code examples. For Android code samples, beware of which version the help/code examples are targeted for. Not sure how true this is, but it felt the iPhone API changes were more stable than Android over the different versions.

Publishing: Android

Wow. I cannot believe how easy it is to publish an app on Android compared to iPhone. It literally took 5 minutes to get an app signed and published on the Android. I remember the first time I published an iPhone app, it took at least 5 hours of debugging various problems in the signing and build configuration.

2 thoughts on “Android And iPhone Development Thoughts

  1. Pingback: Joomla! 1.5 Development Cookbook (Paperback) | Web Host Site

  2. Khang Vo

    I will definitely agree with your points. I already tried both iPhone and Android development. I also think that you may miss 1 important point, the programming language and library support. Android has Java, a better programming language, imo, with better community support. Objective-C is not bad but because only Apple use it, so it is hard for any new developers

    Reply

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 )

Connecting to %s