Monday, March 5, 2012

Why don't I write an Android version of PDX Bus?

This is one of the most common questions about PDX Bus,  and I have not really answered it.  So here goes!

Firstly - part of me really likes the idea of porting the app to Android.  Being an iPhone developer for a free app can be incredibly annoying:

  • I have to pay Apple $100 a year for the privilege of being able to put an app on a device.  (Yes the Civic App awards prize money covers that, but it i still annoying that actually I am the only one who has to pay to use PDX Bus!).
  • The app approval process is still slow and feels random.  You may get rejected as Apple may simply decide your app does something they don't like.  It can take anything from 2 days to 2 weeks to get approved.
  • Technically, the apps in the app store cannot be "free" by the definition of the GPL - apps cannot be shared or modified by their users.  Kids can't experiment with writing apps.  It feels like censorship. This is just annoying.
So why don't I just recompile it for Android.  :-)  Here this bit gets technical.  Basically I'll have to start again... (Skip this technical bit...).

  • PDX Bus is written entirely in Objective-C, Android apps are written in Java or recently C/C++.  You might think that this is a small difference...  Objective-C is quite different from these languages in syntax. The code looks really different, it would need completely re-writing.
    • The back end data retrieval code is tightly coupled to Objective-C frameworks.  For example, Apple provides an XML parser - this returns the tags and data in Objective-C associative arrays ("NSDictionary") from which you access the XML tagged data and place it into objective-C objects for use by the UI.  This'll need completely re-writing.   PDX Bus currently deals with 10 different XML schemas for the different data.
    • The GUI is written entirely with Apple frameworks (UIKit) and none of it can be re-used - Android GUIs have a completely different paradigm.  The GUI has been a lot more work than the back end.     Even the Google Maps API is completely different on the two platforms.
Summary:  Almost none of the PDX Bus code can be re-used as-is for Android.  Some of the design and flow could be re-used, but still, there would be a lot of re-coding.   I don't have the time for this!

3 comments:

Anonymous said...

Thanks for the explanation! I've heard great things about your app from my friends with iPhones... but I loathe Apple products. Will look for an alternative. :-)

Nick said...

As a recent convert to Android from iOS, I am sorely missing PDX Bus. I don't know why I didn't check first!

But ... if it at any time became possible, I would pay for your app on Android and I'm sure others would too. It really is the best one out there - I'm only now realizing how spoiled I was with it.

If someone were to come along and offer to partner with you to code your app for Android, would you be interested? I don't know how, but I could learn!

Teleportaloo said...

Sorry Nick - I simply don't have time; I do this as a hobby and it takes a time to keep up with the technology.