In case you have no background in Computer Science (like me) it can be very hard to learn Java for Android. I think first you need to ask yourself why do you want to learn Android Development? This can be because it’s just fun or you want to have a better understanding of the Java syntax or maybe you have a great idea for an App.
As it will take a lot of time and effort to learn Android, the reason for yourself need to be right, otherwise you will probably stop after a few days or weeks. In case you are like me a product manager in the domain of mobile technology one of the benefits was that I have become a more productive product manager as I’am better understand the underlying technology and developer challenges now. Since I develop Android Apps as a hobby, I became better in thinking through requirements, limitations and resource efforts.
It will probably take years to become a very good Android or Java programmer , nevertheless depending on how much time you invest you will be able to make simple applications after a few weeks. In this post I will elaborate on some of the resources I used to learn Java for Android. I took a few steps in a certain order to learn Java and Android, these steps might work for you as well.
You hear a lot of people telling you need the Android SDK and Eclipe IDE (developer environment) to develop apps, in principle this is true, but this can be very overwhelming when you start as a beginner. My advice is to start learning the basics of the Java syntax first; before you get yourself involved in any Android Tooling or libraries. Learning Java, especially in the beginning is quite boring as you will be busy to understand variables, operators, functions, Arrays and Object Oriented Programming. In my experience understanding these concepts make you half way to become an Android Developer.
I have listed below a suggestion for steps you could take and listed also some resources like blogs, videos, and books.
Step 1: Learn the Java Basics
You can learn the basics of Java completely free through online resources like oracle.com but personally I have chosen for the old-fashioned book (well e-books). The reasons is that books use a certain structure to get yourself warmth up and you don’t need to figure out in what order you can best learn the concepts.
You are probably aware of this series of books. The book is very easy to read and will get you quickly in a few days up to speed on the basics of Java.
Another very good book to read is Java Head First, is a very pleasant book to read as it uses illustrations and little assignment to learn Java. I think the book is not intended for absolute beginners though. It’s a very good follow-up reader on the beginners book Java for Dummies.
Step 2: Learning the Android Environment and Android
After I had a better understanding of Java I decided to install Eclipse and the Android SDK. For both many tutorials are available on the web which can help you to install the Eclipse developer environment and the SDK libraries of Android.
Tutorial Eclipse installing (Note that Eclipse is not just used for developing for Android, as this Tutorial shows you can also use it for Java development)
Tutorial Android SDK (you need the Android SDK to access all the libraries of Android and for example the layout-editor for creating the GUI of your apps).
After you have installed Eclipse and the Android SDK Plugin you can start developing your first App. Your first impression will probably be similar to mine. Ok, so I learned the Java Basics but how do I start for Android?
You can search for some tutorials on the web (they seem to be unlimited) or you can take some more structure in your learning process. I decided to take a course on Udemy.com for Android for Beginners. At the time of writing this post the course price was $ 99. When you follow the authors of this course learntoprogram.tv via twitter or Facebook you might find a price coupon to get a nice discount.
Step 3: Tips and Tricks
Learning Java and Android is a lengthy process, probably with a lot emotions like frustration and happiness. Before you throw your PC or Mac outside the nearest window; the following tips might be useful.
1) Sometimes you get to a point that you think that no solution works or it’s just not possible. Most of the time your just looking at it the wrong way. My advice is to keep it for what it is for a day or 2 and sometimes it just pops-up in your mind.
2) Use Google! The best way to find solution for your problem is often to search with the Android jargon in your search. For example don’t search: “how to get an image from the gallery in the app” but search like ” how to retrieve gallery image in ImageView” . You will get better in this while you progress and learn.
3) Use StackOverflow! Stackoverflow is a community of Developers you can read problems and suggested solutions or post questions. It’s very likely that the problem you have has already been encountered by someone else and solved by someone else.
4) Learn from people’s code. There is no harm to copy snippets of code. But I strongly advice not to continue with your project when you don’t understand the code. I have a personal rule that I dont continue on my project if I dont fully understand what I am doing….
5) Start with little projects to understand a wide-range of the Android Library and Classes. You will progress quicker and live a more happier developer life.