Getting Started with Android Development
Several people have asked me what the best resources are for getting started with Android. There are so many Android code blogs with “working” example out there, it’s hard to know what’s the best way to get started. I’d recommend starting at the official Android Developer site, as it has the most up-to-date documentation and plenty of basic examples, which should be enough to get you started on a basic application. Here are some other resources I’ve compiled for getting started with Android development.
The most dreaded part of starting something new…getting your development environment set up. If you don’t have Eclipse or the Android SDK already, follow these instructions. Do yourself a favor and use Eclipse. Even if you are a hardcore Intellij fan, switching to Eclipse and learning/remapping the keyboard shortcuts will make your life easier (I did it). It is fully integrated with an Android plugin, so starting a new project, debugging, running, etc are all very straightforward.
No “getting started” guide would be complete without Hello World. The Developer site has a good Hello World tutorial that does the basics but then also walks you through some more things like laying out the UI in an xml file and debugging you app in Eclipse. You can even try your luck with uploading your Hello World app onto Android Market (check out the reviews)!
So much to learn! Activities, services, content providers, broadcast receivers, intents…it’s hard to know where to start. Take a look at the Application Fundamentals and also the more in-depth explanations under “framework topics,” but don’t get too bogged down by the details. I’ve found that the best way to learn something new is to get a general overview and then start a small project. After I’ve immersed myself in it a bit, I’ll come back to all that stuff I tried to read at first, and it makes a lot more sense.
StackOverflow is a great resource with a very active community. If you’re just starting off and get stuck, odds are that there are already several relevant StackOverflow questions with accepted answers. There are also various Google groups, but I’ve found the noise-to-signal ratio to be unbearably high, especially in ones that advertise themselves as for beginners.
There are so many random developer blogs online that it’s hard to know which ones are reputable and current. Here are a few I’ve found to have solid content.
Android Developer Blog – This is the official Android Developer blog, and frequently has posts on best practices and tips from various people on the Android team.
Romain Guy’s Blog – Romain Guy is an engineer on the Android team at Google. Be sure to check out his posts on layout tips (1, 2, 3, and 4). He is also very active on Stack Overflow.
Daniel Lew’s Coding Thoughts – Dan is an Android developer at Mobiata, and we met at Mobile World Congress a few months back.
If you are really starting from scratch, you probably first want to go through the setup steps and play around with some simple examples. Once you feel like you have a basic grasp what’s going on, the Google I/O videos are a great resource.
The problem with books is once they are published (or sometimes even before), they start to become outdated. That being said, there is something nice about paging through a physical book. I started off with Professional Android Application Development by Reto Meier, and made it through a few chapters before starting working on a simple app, and then referring to the book as necessary. Another highly recommended option is the set of CommonsWare books–$40 buys you digital editions of all three books and updates for a year. The author, Mark Murphy, is also extremely active on Stack Overflow.
- Switching from IDEA to Eclipse and Mac Keyboard Shortcuts
- APCalcRef Launched on Android!!
- Debugging Android Widget
- Up and running on AppEngine!
- Google Announces App Inventor