Testing Locations on Real and Virtual Devices

Testing an app like RunTracker can be challenging, even for an avid outdoors-programmer. You want to ensure that the locations you receive from the system are being appropriately tracked and stored. This can be difficult to do if you are moving around, even at the low speeds achieved by having your friend haul you and your development setup around the neighborhood on a bicycle trailer.

To get around situations like this, you can send test locations to the LocationManager that will allow your device to pretend that it is somewhere else.

The simplest way to make this happen is using the Emulator Control window within DDMS. This only works with virtual devices, but it allows you to specify new locations ...

Get Android Programming: The Big Nerd Ranch Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.