Using DDMS To Set Your Android Emulator’s Location

In an earlier post I covered how to use terminal to set the location for the Android Emulator.  A few people mentioned that it might be worth covering how to do the same using the Dalvik Debug Monitor Server (DDMS).  When building Android Apps I tend to have this app open in the background since it provides helpful memory and process monitoring.

DDMS is a utility that provides a ton of useful information.  I highly recommend reading its documentation here.

If your IDE supports the ADT plugin you can even use DDMS within your IDE.  To make things easier, I’ve covered how to use DDMS as a stand alone application below. Please reference your IDE’s documentation for ADT support and installation instructions.

Finding DDMS

DDMS is located in <Your Android SDK Folder> / tools.  The below example shows this installation path where the root SDK folder is called AndroidSDK. Depending on your installation your path might be different.

image

Opening DDMS

To launch DDMS in stand alone mode, simply double click on DDMS. You will see a DOS or terminal window for a second when the application is loading.

Setting Your Location

Now that you have DDMS open, you want to select your emulator from the list of devices on the left hand side navigator as pictured below.

image

After selecting your device, click on the “Emulator Control” tab on the right tabbar as pictured below.

image

This tab lists all of the emulator settings you can update using DDMS. The location options are at the bottom of the tab. 

DDMS allows you to set the location in the below ways.

  • Manual – set the location by manually specifying decimal or sexagesimal longitude and latitude values.
  • GPX – GPS eXchange file
  • KML – Keyhole Markup Language file

The below shows using the manual option to set the coordinates to New York’s Time Square. After updating your location information press the “Send” button. This will update the emulator with your new location information. Please note you might need to restart your App or perform a location lookup in the emulator’s native Map App in order to jump start the process.

image

Quick Walk Through Video

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s