Emulator and Android Device Debug

The emulator launches a window on the development computer that looks like an Android phone and runs actual ARM instructions. Note the initial startup is slow, even on high-end computers. Although there are ways to configure the emulator to try to emulate many aspects of a real Android device such as incoming phone calls, limited data rate, and screen orientation change, some features (such as sensors and audio/video) are not the same. The emulator should be considered a useful way to validate basic functionality for devices not available to the user. For example, the tablet screen size can be tried without purchasing a tablet.

Note that a target virtual device must be created before the emulator can properly run. Eclipse provides a nice method to manage Android Virtual Devices (AVD).A handy list of keyboard shortcuts for emulator functions is shown in Table 1.4.

Table 1.4 Android OS Emulator Controls


Emulated Function


Back button


Home button

F2, PageUp

Menu button

Shift-F2, PageDown

Start button


Call/Dial button


Hangup/EndCall button


Search button


Power button

Ctrl-F3, Ctrl-KEYPAD_5

Camera button


Volume up button


Volume down button


DPAD center


DPAD left, DPAD right


DPAD up, DPAD down


Toggle cell network on/off


Toggle code profiling (when -trace set)


Toggle fullscreen mode


Toggle trackball mode

Ctrl-F11, KEYPAD_7

Rotate screen orientation to previous or next layout

Ctrl-F12, KEYPAD_9

In general, the first testing is best done with an Android phone. This ensures full functionality and real-time issues that cannot be fully recreated with the emulator. For an Android device to be used as a developer platform, just hook it to the USB using the USB cable that came with the phone and ensure the USB driver is detected (this is automatic with a MAC; the drivers are included with the SDK for Windows; and see Google's web page for Linux).

Some settings on the Android device need to be changed to enable developer usage. From the home screen, select MENU^Settings^Applications^Unknown sources and MENU^Settings^Applications^Development^USB debugging to enable installation of applications through the USB cable. More details about Android debugging are provided in Chapter 12.

Was this article helpful?

0 0
Character Building Thought Power

Character Building Thought Power

Character-Building Thought Power by Ralph Waldo Trine. Ralph draws a distinct line between bad and good habits. In this book, every effort is made by the writer to explain what comprises good habits and why every one needs it early in life. It draws the conclusion that habits nurtured in early life concretize into impulses in future for the good or bad of the subject.

Get My Free Ebook

Post a comment