Five top tips for developing Android apps
By Stefan Freitag, European Grid Infrastructure.
At the Mobile World Congress 2012, Andy Rubin (Senior Vice President, Mobile and Digital Content, Google) presented a speech on the rapid growth of the Android operating system. He explained that Google sees 850,000 activations every day, and the total number of activated Android devices exceeds 300 million. This gives you an impression of the extremely large target audience of the Android operating system (OS). As this audience consists of a heterogeneous mass of users, you need to consider a few things before you write an Android app.
1. Select the right platform and Android OS version
You can find the Android OS on smart phones, tablet PCs, Blue-ray players and lots of other gadgets. But before you start developing your app, have an intensive look at the available platforms and decide which ones you are going to support. Be aware that these platforms may run different versions of the Android OS and vary in their screen size and resolution.
To get an overview about the currently available Android OS versions and their distribution among the registered Android devices, have a look at the two following charts (taken from: Android Developer Resources).
The chart above displays the number of registered devices in respect to the version of their operating system (from Android 1.5 to Android 4.0.3) on a percentage basis. The majority of these devices runs Android 2.3.3 and - according to the chart below - this number is still increasing.
2. Select an Integrated Development Environment
Developing Android apps is not magic! It's like writing a Java application: you write your app and include classes and methods provided by external libraries. In this case the software libraries are provided by the Android Software Development Kit (SDK).
Depending on your experience, you may already use one of the existing Integrated Development Environments (IDEs) like NetBeans or Eclipse. Eclipse offers a plug-in mechanism that is widely used to extend the IDE functionality. There is an Android Development Tools (ADT) plugin, which is similar to the C/C++ Development Tooling (CDT) for extending Eclipse with capabilities to support C/C++ projects. These tools support you in setting up new Android projects, creating user interfaces, debugging your applications and even in exporting signed files in order to distribute your application to the app markets.
3. Write quality code
The tips above help you select the development environment and the platform to support. Now, you can begin with your app! As the app will grow over time, it is very helpful to learn about coding standards.
To ensure that your code adheres to a common set of coding standards, you can extend the Eclipse IDE by the installation of the Checkstyle plug-in. After activating this plug-in for your Android project, it continuously inspects your source code and points out items that deviate from a predefined set of coding rules. Another recommended tool is Android Lint. In contrast to Checkstyle, this plug-in is focused on identifying Android-specific issues like layout performance problems, unused resources, icon and usability problems.
4. Test! Test! Test!
When extending your app with new functionality, you will often introduce more complexity - some argue that you can't have one without the other. Thanks to the high quality of your code, it is very easy for you (and others) to read it and understand what is happening behind the scenes. Nevertheless, you have to ensure that the code delivers the functionality you designed it for. Unit tests can do this for you. They are widely used in the Java world, and can be created with JUnit or similar tools.
Ask some of your friends to test the app on their smart phones and tablets. If your friends aren't into Android, then Monkey is worth a try. It can, if connected to an emulator or real Android device, generate pseudo-random streams of user events (e.g clicks, gestures and system-level events) and do a stress-test on your app.
5. Get feedback
After uploading your app to one of the existing market places and releasing it, you have to be patient. The number of Android users is quite huge, so it may take some time before one of them finds and installs the app.
There are many ways to continue from here, like advertising your app. But one thing you should always keep in mind is that your views can blind you to what the majority of the users think about your app. The best way to overcome your preconceptions is to get as much feedback as you can and - most importantly - be open minded to the feedback and act upon its suggestions.
Posted by s.hettrick on Wednesday 9 May 2012.