Thursday, 7 April 2011

First Steps (1) Welcome to Android Elements

Hello and Welcome to Android Elements. The aim of this blog is to assist those who are new to Android development, having already trodden the path myself. Posts will provide concise information and examples whilst pointing out potential pitfalls and problems.

It is now about 6 months since I first decided to have a stab at putting an Android app together after having my HTC Desire for a while. I am a professional developer but mainly on the Microsoft / .NET platform. Even so, the transition to Android, Java and Eclipse was not a smooth one...

Developing for Android

The initial hurdle was the general lack of good information and examples. Google have done an excellent job with their Android Developers site which will probably always be your first stop for information. But it for what is has in detail it lacks in examples.

Also, the nature of mobile development, particularly on the array of Android devices is complicated. Your web development skills will not help you here. Well maybe a tiny bit, but I wanted to sound dramatic.

I would also advise that you should be at the very least familiar with OOP and real-world programming methodologies if you want to start creating apps. This is not BASIC on your BBC Micro (showing my age there). If you're a seasoned Java developer who uses Eclipse on a Linux platform every day, then you have a huge advantage.

The Environment

Your choices for the IDE are the Eclipse or IntelliJ IDEA. Eclipse is by far the more widely used of the two and is also the one used in the Google guides, so this was my choice. However I have heard good things about IntelliJ so intend to check it out soon. I plan to do a whole post on setting up the environment later as there were some steps that I had trouble with even when following the Installing the SDK guide.

The Challenges

The Android platform is evolving rapidly and many of its strengths are also a headache for developers. Take the number of devices for example, great for Android, horrible for testing. Platform updates are also relatively regular with new features being added and old deprecated perhaps twice a year.

When you hit a problem and start searching you will often find examples using different approaches and sometimes raise more questions than answers; should you use the native Android methods?  Are they supported in all versions? Will the Java libraries do a better job? Or perhaps I need a third party library?
You can find a code example that is only year old but is completely out of date. 'Official' examples and best practices often do not exist. For the same reasons a good book only has a very short lifespan. This is very different from the .NET world.


It seems there are very few decent Android resources on the web. The most reliable have proven to be:
  • Google Developers - First stop for detailed information on objects and classes.
  • StackOverflow - A fantastic resource when you get stuck. Growing and helpful community, but be sure to search before you ask questions.
  • O'Reilly Programming Android - online book which is available for until it goes into publication. It's O'Reilly so expect content of the highest quality.

To keep ahead in the dynamic mobile environment you'll need to keep abreast of changes so you should follow (RSS or Twitter) some or all of the following:

Now it's time to take your first steps. Good luck...


Post a Comment