I have been asked several times by many people: “I’ve never done programming before, can I start by writing Android apps?” In this article, I will answer this question and provide pointers to the best places to start.
First of all, it is important to remember that there are several ways to develop applications for the Android platform, from using a non-programmer tool like Google App Inventor, to using a scripting language like Python, to using web technologies like HTML5, to using the Android SDK and/or NDK to create fully fledged apps or games. Each have their drawbacks and advantages (which I will discuss in an upcoming article).
In order to figure out how to proceed, it is important to answer the following question: why do you want to write apps for the Android platform? The answer to this question will impact significantly on how you will develop for the platform. If you’re interested in it because you have an Android device and you’d like to learn how to create simple apps (or you have a specific little app you want to write), then a tool like App Inventor, or even a configurable app like Tasker might be all that you need. If you are a techie that likes Linux and command-line tools, and you’d like to tinker and see what the platform is all about, then a scripting language like Python/Ruby/JavaScript might be more appropriate for your needs. If you’d like to earn an income by writing apps to publish on the market (or by pursuing a career in mobile application development), then the SDK/NDK is probably what you need.
At this point, let me answer some big questions in one fell swoop: Yes, Android development is a good way to learn programming, and no, it’s not advisable to start your programming career by jumping straight into the Android SDK (the learning curve is steep). Your best starting point is to do a basic course (be it offline, online, a book, or just some self-learning) in Java development, object oriented principles (including newer Java SDK features like anonymous inner classes and Generics), and familiarising yourself with the core Java library (for example java.net, java.sql, java.io, java.util, etc). Do not worry about Java applets, AWT, Swing, or other UI technologies as they do not apply to Android (but are nevertheless good to know). Although not stricly necessary, you should familiarise yourself with basic algorithms and patterns like linked-lists, associative caches, and the Gang-of-four patterns. These are all important tools in the programmer’s toolbox that will make your programming career a far more productive one. Do not let these intellectually challenging names put you off though, they are complicated terms for simple ideas that you can learn as you go – you don’t need to know them all by heart before you start! It will help you to familiarise yourself with them so that you know of their existence and you can look them up when you need to use them.
During the learning phase above, I would highly recommend downloading the Eclipse IDE (integrated development environment). This will prepare you well for Android development using Eclipse. Eclipse is an open source general-purpose development tool that you can customise using plugins. Learn how to install plugins. In particular, sign up for a source code hosting platform like ProjectLocker, GitHub, or Google Code, and check your source code in there using an appropriate plugin (such as subclipse for Subversion).
I personally use ProjectLocker with subclipse, and check my code in after every successfully compiled changed (typically every 15 mins). This way, even if I loose my netbook, I will not loose a significant amount of code. You read that right – I do all my development on a netbook (and it is not too slow), so if you don’t have a PC or laptop to develop on, buy any netbook with 1Gb or RAM or more. Add an external monitor, keyboard and mouse for more comfortable coding.
In summary, if you are new to programming and would like to explore Android, your first task is to ask why you want to get into Android development in particular. Based on your answer, you may choose one of several development methods. If you choose to learn the Android SDK, you will first need to learn Java and it’s development environment (including Eclipse and source control like Subversion). Once you have successfully completed all of that (which should not take more than a week or two to get into, but will take years to master), then you will be ready to begin exploring the Android platform. This will be covered in another article.
This article was written by Toby Kurien, an Electronics Engineer with over 15 years of programming experience. Specializing in Java, Web technologies, and Android development, he lives his passion through creating applications and writing articles. Follow him on Twitter: @tobykurien
Thank you very much, indeed. I found your article to be very effective high-level “road map” in determining cost vs. benefit of trying to learn programming in Android. It was factual and informative.
I believe the next logical extension of this article is to develop a more specific and detailed, let’s say 4 weeks, training schedule. This would further guide those non-programmers who want to continue this journey in avoiding pot holes and getting lost.
Heck, I would not mind to pay a little for this extra guidance.
All the best,
-mk
Hi MK
While teaching the Java language is beyond the scope of this blog, I’d like to refer you to the following tutorial from AndroidSPIN called “Train with a trainee”, which goes through the basics of the Java language, but in an Android context: http://androidspin.com/tag/train-with-a-trainee/
I believe that’s what you (and other readers) might be looking for. Hope that helps.
In my opinion it is good to have already some experience in programming is particularly useful if someone is already using Swing as the UI in Android has much in common with swing.
Iam a student in electrical enginneering final year!! And my final year project is about google android.
I don’t know java but do know C programming? will that help?please answer me
@harold Yes, C programming will help, although you will need to learn about Object-Oriented Programming (OOP) too. A quick tutorial on the web will be all that you need to get started. Because Java has a garbage collector, you will find it easier than C as you don’t need to allocate and free RAM manually.