Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Beginning Android for iOS Developers (clayallsopp.posterous.com)
197 points by 10char on March 7, 2011 | hide | past | favorite | 23 comments



Hey HN, I wrote a 9-part series on how starting Android from the perspective of an iOS developer.

tl;dr I walk you through how I ported one of my iOS apps. There are UIKit references and such, but anyone can pick this up and learn something (I cover parsing JSON from the file system, serializing objects, HTTP requests...yknow, all the useful stuff).

I've never written anything of this scale, so criticisms are welcome!


Just 2 months ago I was searching for exactly this. This is going to be really useful for a lot of people, thank you. No time to read it now but it's on my Instapaper list.


I've never done any iOS development but I have a feeling this is going to help me with the things I can't seem to find guidance for - thank you!


Thank you and good job!


This looks very helpful. Thanks!


Brilliant -- I've built a couple of Android apps so far, and found that poring through the SDK, while valuable, is somewhat a steep curve to those of us who don't enjoy Java.

Seeing the language documented one function at a time also loses out on how the components interact, design patterns that make sense, and other considerations that I am certain this will help with.

Thank you for sharing.


If you don't have the time to rewrite your app manually, there is another way: it's possible to recompile an iOS app to run natively on Android using the NDK. This is tricky to set up, but I can do it for you: http://www.apportable.com


Is this just spam, or do you have links to the technical details? It sounds like it could be a huge boon to lots of iOS devs.


I posted a brief explanation and demo installer at http://www.cocos2d-iphone.org/archives/1350. I'm using http://www.cocotron.org/ and http://www.gnustep.org/ to provide the missing platform libraries.


How do we "release" objects...? Just kidding, awesome tutorial, I was looking for something like this, thanks.


light but still a very good article. it would be nice to have something the other way :-) Android to iOS


Yes, I was thinking this exact same thing.


Joining the choir, this is fantastic. I've been writing Android apps for a year, and still got several useful pointers out of it.


Does anyone know of anything in reverse (iOS for Android developers)?


Love this! The biggest learning curve for me is the lack of a decent layout editor. I know I'm supposed to be teh hardcorez, but Interface Builder is really nice for at least getting your items to line up right.


If you like it now, check out what's in OS X Lion and (inevitably) iOS with regards to keeping interface objects lined up. No more struts and springs.


How did you like developing for Android vs iOS?


I was actually thinking about adding this as an epilogue. I'll summarize my thoughts real quick:

- Biggest difference is making interfaces, both in terms of tools and higher level philosophy. Having Linear/Relative/Table/etc Layouts is a really foreign concept to iOS developers, who are used to just using two sets of pixel dimensions (320x480 or 768x1024). Once you get some practice with them it's not a big deal, but its definitely one of those things that originally made me stop learning Android dev on my first try. At the same time, it's necessary to have all these different ways of laying out data to cope with the device fragmentation. There are tools built into Eclipse and elsewhere (DroidDraw) that give you a graphic representation of what you're doing, but they're not as tightly integrated into the development process as Interface Builder is to iOS.

- Related to that point, I feel like it's just a lot easier to do complex and custom interfaces on iOS. I haven't delved too deep into this on Android, but all of the really awesome Quartz features for manipulating and animating views just don't exist (although I heard 3.0 is trying to change that).

- Dealing with touches is something much more deeply ingrained in iOS than in Android; from what I've heard, it's actually non-existant in pre-2.0 APIs. I believe there's just not concept of a UIResponder-esque chain of handling events, which sucks because those form the backbone of really cool interfaces that iOS apps are known for.

- All that being said, it was actually pretty enjoyable once I got the hang of it. Things like ArrayAdapters are really useful and my code was more modular because of them. Now, if Apple got around to bringing all the Bindings and NSObjectController magic to iOS...

tl;dr the Android SDK (pre 3.0) seems better suited for business-as-usual apps than the gorgeous interfaces you find on the App Store.


Hmm, not exactly a ringing endorsement. It's interesting how so many Android fans call the fragmentation issues FUD, but developers consistently confirm it as a real problem. Supporting multiple devices like that is a headache for the small developers that make up the majority of mobile app development.


Most Android tutorials are written by Android/Java veterans, so I used to find them hard to follow. This one is great because it's written by a (former) beginner, for beginners. Nice work!


Thanks for sharing. The Android sdk samples dont actually include any parsing/reading data from file examples, so this is useful even for non-iOS devs.


It feels trite to reiterate so many other commenters but I really liked your take on Android development and would like to see more.


I'm a "veteran" iOS/Cocoa developer who has just started his first Android project a few days ago. Coincidence? :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: