tags:

views:

277

answers:

2

I have made apps for the iPhone, but want to also code for the Android but want to know if it is first worth my time, second worth my having to learn another language, and third worth the effort in the sense that am I going to make a profit from this. Also if in any way Android code is similar, then will it be hard to bring the iPhone (Xcode) files, or copy and paste my iPhone code into the Android code.

+5  A: 

Yes -- programming on the iPhone uses Objective-C while programming for Android is in Java. Although they use similar concepts, the two languages are different.

I was a Java programmer before switching to Objective C. Personally I like Objective C better than Java, but that's just a personal opinion ;)

iPhone Guy
+5  A: 

It's a most definite no. As iPhone Guy pointed out, there's a major difference in the languages both platforms require. iPhone uses Objective-C whereas the Android is based on Java (don't know if it's Mobile Edition or "regular" though). In addition, it's a completely different set of APIs. iPhone uses a modified form of Cocoa called Cocoa Touch whereas the Android makes uses of Google's SDK for it. In answer to your question, you won't be able to copy/paste your code between the languages. Your Objective-C code won't compile to Java and vice versa.

Ok well will a few of the concepts be similar? As in I don't know Java at all.
Jaba
+1 for the point about the APIs. Yes, sure, the languages are different, but if you know one, it's not that hard to pick up the other. The API differences, though, could end up forcing a complete re-design or re-implementation of huge portions of code.
Alex Basson
Yes, most of the concepts will be similar as both are Object Oriented languages and hence will rely on classes and methods. So yes, there will be concepts in common and as Alex correctly pointed out, once you know one language it's easy enough to pick up another one. The major differences will be in the standard libraries and the platform APIs meaning you won't be able to write your code once and copy it between platforms.
Wow not really looking forward to rewriting my code but looking forward to selling it though s there are some benefits to ones who are patient
Jaba
Ehm ... most android users want it for the benefit of having stuff for free ... not sure how much money you will make ... on the other hand most iPhone or mac users like to pay for better than average quality (otherwise they would stay with cheap average stuff) ...
stefanB
Considering the sales figures that most popular game developers have posted, you will probably not make a dime on Android software unless someone is paying you to write it.
Azeem.Butt
@NSD: True story.
Ben Gotow