The Android software development kit contains a number of tools to simplify your development tasks. Several of these tools really stand out for the value they add to the Android SDK. The best android developer tools included in the SDK help save time and development effort by streamlining common development tasks. Here is a summary of some of the most valuable Android developer tools packaged in the Android SDK.
Android Development Tools Plugin for Eclipse
Eclipse is probably one of the best IDE development tools for Java based development. As an open source project, there are numerous plugins available to make Eclipse work with a variety of platforms and languages. The Android SDK includes a plugin for the Eclipse environment for developing Android applications.
The Android Development Tools Plugin for Eclipse (ADT) provides a number of shortcuts to other tools that make your Android application development go much more smoothly. When you create a new project in Eclipse, the ADT will generate the necessary stub files and layout your source files to build your application. Running or debugging in Eclipse will also automatically launch the emulator to allow you to test your application on an emulated hardware profile. The ADT even includes tools for packaging and distributing your Android application. You can literally do it all from within Eclipse by using this plugin.
If you don’t already use Eclipse, it can have a steep learning curve. Many developers already have their favorite IDEs and development tools. If Eclipse isn’t one of them, you may want to use your existing favorite tools to build your Android application. Fortunately, the Android SDK is flexible and you certainly have the option of using your own IDE and tools. However, many of the processes of writing, compiling, testing and bundling an application are automated in Eclipse. If you use your own tool, you’ll need to learn to use the individual pieces of the Android SDK such as the emulator. You’ll also need a number of open source applications to build your Java application such as Ant. If you’re already doing Java development, you probably have a number of these.
One tool that will be indispensable to you if you use your own IDE is the Activity Creator. This is also called the Android tool. It’s a series of scripts that help you start a new project by creating the required files and source file layouts. This is a command line tool which you pass some parameters including the name of your project and the working directory for your project. It will create the required source code layout and build a properties file for you. It will also create the build.xml need by Ant to build your application.
The Android Emulator is probably one of the coolest tools included in the Android SDK. This is a QEMU-based application that emulates an Android mobile device. It allows you to test your application on various hardware and system configurations without owning multiple Android mobile devices. The emulator even allows you to run different versions of the Android system so you can verify that your application will be compatible between differing Android versions.
Another really useful feature of the emulator is that you can run more than one instance of it on your development machine. This allows you to simulate calling another Android phone or sending SMS to another Android phone. To emulate a voice call from one emulator to another you simply enter the port number of the emulator you want to call in the dialer application and press send. To find the port number of the emulator you want to call, look in the title bar of the emulator window. The title bar will read “Android Emulator” and the port number will follow in parentheses.
Android Debug Bridge
The Android Debug Bridge is used to debug your applications. This is a client-server tool which interfaces with a debugging daemon on each emulator instance. The ADB provides a number of commands for collecting and analyzing debug output from your emulator instances. When the ADB is started it scans the ports in a range from 5555 to 5585 to find all the running emulators. You can get a list of all the to which the ADB is connected by issuing the command:
The output will give you a listing of all the emulators and their serial numbers. You’ll need the serial number to issue debugging commands to a specific instance of the emulator.
Another useful tool in the Android Debug Bridge is the logcat tool. Logcat allows you to view and filter the various logs collected by the Android emulator. These logs are kept in circular buffers and can be viewed by issuing the command:
There are a number of additional options and filters you can specify so you’ll want to familiarize yourself with the complete syntax. Logging output can become pretty verbose so you’ll save a lot of time if you know what you’re looking for and how to filter for it.
Android Interface Description Language
Android Interface Description Language is a type of Interface Definition Language used on Android to marshall objects and pass them between two processes. This is how Android manages Interprocess Communication (IPC). It has a number of similarities to remote procedure calls used in Com and Corba. While it is definitely lighter weight than either Com or Corba, the marshalling code is still difficult to write. This is where the Android Interface Description Language comes in. It allows you to create an .aidl file in which you create your interface as a subclass of the Stub abstract class. The compiler then will generate the necessary Java code to create your interface. This greatly simplifies IPC programming for Android.
While the SDK contains a number of other very useful Android developer tools, these are the best Android developer tools in terms of streamlining development and creating value for the SDK itself. The ADT, Android Emulator, ADB, and AIDL simplify the development of Android applications.
Help us spread the word!
If you liked this article, consider enrolling in one of these related courses:
|Mar 16-18||Java for Android|
|Apr 06-09||Android Bootcamp|
|Apr 13-14||Android Application Development|
|- Classroom - Online|