Controlling the Emulator

You can use emulator startup options and console commands to control the behaviors and characteristics of the emulated environment itself.

When the emulator is running, you can interact with the emulated mobile device just as you would an actual mobile device, except that you use your mouse pointer to "touch" the touchscreen and your keyboard keys to "press" the simulated device keys.

You can run your application on a single instance of the emulator or, depending on your needs, you can start multiple emulator instances and run your application in more than one emulated device. You can use the emulator's built-in commands to simulate GSM phone calling or SMS between emulator instances, and you can set up network redirections that allow emulators to send data to one another. For more information, see Telephony Emulation, SMS Emulation, and Emulator Networking

To start an instance of the emulator from the command line, change to the tools / folder of the SDK. Enter emulator command like this:

The table below summarizes the mappings between the emulator keys and and the keys of your keyboard.

Emulated Device Key

Keyboard Key

Home

HOME

Menu (left softkey)

F2 or Page-up button

Star (right softkey)

Shift-F2 or Page Down

Back

ESC

Call/dial button

F3

Hangup/end call button

F4

Search

F5

Power button

F7

Audio volume up button

KEYPAD_PLUS, Ctrl-5

Audio volume down button

KEYPAD_MINUS, Ctrl-F6

Camera button

Ctrl-KEYPAD_5, Ctrl-F3

Switch to previous layout orientation (for example, portrait, landscape)

KEYPAD_7, Ctrl-F11

Switch to next layout orientation (for example, portrait, landscape)

KEYPAD_9, Ctrl-F12

Toggle cell networking on/off

F8

Toggle code profiling

F9 (only with -trace startup option)

Toggle fullscreen mode

Alt-Enter

Toggle trackball mode

F6

Enter trackball mode temporarily (while key is pressed)

Delete

DPad left/up/right/down

KEYPAD_4/8/6/2

DPad center click

KEYPAD_5

Onion alpha increase/decrease

KEYPAD_MULTIPLY(*) / KEYPAD_DIVIDE(/)

Note that, to use keypad keys, you must first disable NumLock on your development computer.

0 0

Post a comment