views:

629

answers:

10

Hi,

I am C++ developer interested in Android. As I understand the only possibility to develop applications for Android is Java. There is NDK also, but as I can see it is just something like JNI for Java. Is it mandatory to learn Java or to have deep knowledge in Java then try Android SDK, or it would be possible to learn Java while developing for Android.

Thank you.

+3  A: 

The official Android tutorial assume you already know Java.

Anyway, to follow them you don't have to be a Java expert. You should only know the basics.

klez
+3  A: 

If you're an adept C++ programmer, you should not have much trouble picking up java, period.

Developing for Android is a little bit different than desktop java, but I refer to my earlier point: if you're an adept programmer already, you should be able to pick it up easily. As you go along and get stuck, post questions here when you get stuck.

Nate Bross
Great, so I think I can just try to do some basic things in Android and will get a reference book for Java.
I'd say that's a great starting point. For me, the biggest pain in starting it was just setting up the IDE in Eclipse because you need to download plugins and setup directories for your Android VMs.
Nate Bross
If you follow the instructions, setting up Eclipse and Android on Windows is extremely quick and simple
HXCaine
@T3Roar Maybe thats where the issue was, I found the documentation somewhat scattered. The install was not hard, it just took a bit of time to get it working correctly. At least for me.
Nate Bross
A: 

You will of course have to learn some Java. However as there are certain preferred 'optimizations' when coding on Android, one could argue it's a great theater for you to learn in. Definitely follow the tutorials, documentation, and example code that google provides, it's great.

chase
+1  A: 

Android is a framework over Java. So having Java knowledge really helps. Being a C++ developer yourself, it wouldn't hard for you learn the basics of Java.

This might help you

http://primalpop.wordpress.com/2010/05/26/first-few-steps-in-android/

primalpop
A: 

In my opinion, your knowledge of C++ should be sufficient to pick up the Java necessary to write most Android applications. Some of the Java syntax may trip you up a bit, but IMO it wouldn't be anything that is insurmountable especially coming from a C++ background.

Most of the complexity associated with Android (not that it is very complex) is more of a high level complexity rather than actual Java. Understanding the Android system is much more like understanding a computer system or a framework than understanding the innards of Java.

Chris Thompson
A: 

Just forget about languages and sintax. If you can write some pseudo-code and can understand the OO model, then you can program almost everything easily, it's just a matter of some API references and google searches.

eMgz
A: 

I understand that you need to learn Java, and also going to have to learn to use the Android API, learn the philosophy of development Mobile, etc. Just the basics yes, to begin ... ... The deepest you navigate the android world the deeper you will be knowing all these issues, it's like everything mate!

It's important to know that the learning curve is relatively short in Android :)

feragusper
+1  A: 

You may want to take a look at these Java cheatsheets for C++ programmers:

However, I recommend you get a Java book as well as an Android one. Although the internet (and stackoverflow) is great for lots of stuff, having a few good books can be a huge time saver, imho. You can search for questions on stackoverflow on what are good Android and Java books. There are even free pdf books available online.

To answer your question specifically, yes, it's important to know Java - after all that's the language you're going to use - but you do not need a deep understanding of it, at least initially. For example, you don't need to know the more advanced stuff you'd get from a book such as Effective Java. Do keep it mind that most of the ways of doing things for Android is constrained by the Android framework, so knowing Java will help but will not suffice. To sum things up, I'd say read a good Java and a good Android book, follow the Google tutorials, and a last piece of advice: don't forget you can download the actual Android source code, which will help you in many ways.

JRL
A: 

I too am picking up Android Development with C#/VB.net as my primary languages. The book I ordered and that I see recommended over and over again is:

sunpech
A: 

I am coming to it from C# and the issues are just understanding the Android way of doing things, rather than any particular language issues.

I recommend the Commonsware titles on Android.

Alan B