The Emulator Console

Another powerful debugging technique is to run the Emulator Console, which obviously only works with the emulator. To get started once the emulator is up and running, you'd type the following in a tools window

telnet localhost port#

where port# is where the emulator is listening. The port# is typically displayed in the emulator window title and is often a value such as 5554. Once the emulator console has launched, you type commands to simulate GPS events, SMS messages, and even battery and network status changes. See the “References” section at the end of this chapter for a link to the Emulator Console commands and their usage.

Get Pro Android 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.