EMULATING PHYSICAL CAPABILITIES

In addition to emulating devices of different screen sizes, you also have the option to emulate different hardware capabilities. When creating a new AVD, clicking the New . . . button will display a dialog for choosing the type of hardware you want to emulate (see Figure B-16).

For example, if you want to emulate an Android device with no touch screen, select the “Touch-screen support” property and click OK. Back in the AVD dialog, change the value of the property from yes to no (see Figure B-17).

This will create an AVD with no touch-screen support (i.e., users won’t be able to use their mouse to click on the screen).

You can also simulate location data using the Android emulator. Chapter 4 discusses this in more detail.

KEYBOARD SHORTCUTS

The Android emulator supports several keyboard shortcuts that enable you to mimic the behavior of a real handset. The following list describes the shortcuts that you can use with the emulator:

  • Esc — Back
  • Home — Main screen
  • F2 — Toggles context-sensitive menu
  • F3 — Call Log
  • F4 — Lock
  • F5 — Search
  • F8 — Toggles data network (3G)
  • Ctrl+F5 — Ringer volume up
  • Ctrl+F6 — Ringer volume down
  • Ctrl+F11/Ctrl+F12 — Toggle orientation

For example, by pressing Ctrl+F11, you can change the orientation ...

Get Beginning Android 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.