DDMS Dalvik Debug Monitor Service

Installing the Android Software Development Kit adds DDMS to the Eclipse integrated development environment, providing a window-oriented interface to Android-specific debug information on the target. The most frequently used perspectives are displayed in the upper-right corner of the Eclipse window. If there's a DDMS button there, you can just click on it to switch to DDMS. If not, in that same area there is a little window symbol with a + sign in its upper-right corner. Clicking on this window will open a menu of Perspectives, including DDMS.

The DDMS perspective has four panes by default. Starting from the upper left and going left to right down the screen, these are:


This lists the available target devices connected to Eclipse, and the processes running on each device. The default emulator device is labeled with its port number (5554). There are also some toolbar buttons in this pane, described later in this section. Threads/Heap/File Explorer

This provides three different views of what is going on in the target. The Threads tab shows the currently active threads in the selected "client," which is the application selected in the Devices pane. To see the Threads information, you have to click the "Update Threads" button at the top of the Devices pane. The Heap tab shows the state of the VM's heap memory, and is updated at each garbage collect. Again, in order to see the Heap information, you need to enable it by clicking the "Update Heap" button at the top of the Devices pane, and you may need to exercise the application for a while until the VM decides a garbage collect is required before the information will be updated. You can also force a garbage collect by clicking on the "Cause GC" button in the Heap view. Emulator Control

This gives you control of the Telephony and Location emulation functions:

Telephony Emulator

You can simulate voice and data operation in a variety of network states (unregistered, home, roaming, searching, denied) and at a variety of network speeds and latencies. It's useful to vary these parameters during application testing to be sure that your application responds appropriately in all typical situations. You can also simulate incoming voice and SMS calls from a specific number (to test Caller ID), and create the SMS message to be received. Location Emulator

Here you can send a specific location fix to the Location Provider by entering a latitude and longitude. You can alternatively load a GPX or KML file of locations to be played back to the Location Provider in a continuous sequence, as though the target was moving around.


This is similar to the "catchall" pane in the Debug perspective, providing a collection of useful tabs that display the indicated information. Screen Capture

This isn't a pane, but one of the toolbar buttons in the Display pane. It looks like a very small Android screen, and when you click it, it captures and displays what is currently showing on the target screen. It gives you the opportunity to save the capture to a PNG file, which you can then use as you would any other image.

Was this article helpful?

0 0

Post a comment