The Android Virtual Device Manager

The Android Virtual Device Manager is used to create and manage the virtual devices that will host instances of the Emulator

AVDs are used to simulate the software builds and hardware configurations available on different physical devices. This lets you test your application on a variety of hardware platforms without needing to buy a variety of phones.

Each virtual device also supports a number of specifi c hardware settings and restrictions that can be added in the form of name-value pairs (NVPs) in the hardware table. Selecting one of the built-in skins will automatically configure these additional settings corresponding to the device the skin represents.

The additional settings include the following:

  • Maximum VM heap size
  • Screen pixel density
  • SD card support
  • Existence of D-pad, touchscreen, keyboard, and trackball hardware
  • Accelerometer, GPS, and proximity sensor support
  • Available device memory
  • Camera hardware (and resolution)
  • Support for audio recording
  • Existence of hardware back and home keys

Different hardware settings and screen resolutions will present alternative UI skins to represent the different hardware configurations. This simulates a variety of mobile device types. Some manufacturers have made hardware presets and virtual device skins available for their devices. Some, including Samsung, are available as SDK packages

Monkey and Monkey Runner

Monkey and Monkey Runner can be used to test your applications stability from a UI perspective.

Monkey works from within the ADB shell, sending a stream of pseudo-random system and UI events to your application. It’s particularly useful to stress test your applications to investigate edgecases you might not have anticipated through unconventional use of the UI.

Alternatively, Monkey Runner is a Python scripting API that lets you send specific UI commands to control an Emulator or device from outside the application. It’s extremely useful for performing UI, functional, and unit tests in a predictable, repeatable fashion

Leave a Comment