Sunday, October 7, 2012

anroid emulator and virtual device

An AVD is a device configuration for the Android emulator that allows you to model different configurations of Android-powered devices.

To configure AVD we follow( for eclipse): Window-->AVD Manager

Creating AVD using AVD Manager

An AVD consists of:

A hardware profile: Defines the hardware features of the virtual device. For example, you can define whether the device has a camera, whether it uses a physical QWERTY keyboard or a dialing pad, how much memory it has, and so on.
A mapping to a system image: You can define what version of the Android platform will run on the virtual device. You can choose a version of the standard Android platform or the system image packaged with an SDK add-on.
Other options: You can specify the emulator skin you want to use with the AVD, which lets you control the screen dimensions, appearance, and so on. You can also specify the emulated SD card to use with the AVD.
A dedicated storage area on your development machine: the device's user data (installed applications, settings, and so on) and emulated SD card are stored in this area.

we can create as many AVDs as we would like to test on. It is recommended that we test our applications on all API levels higher than the target API level for our application.


Configuration Inf to Create Galaxy_Nexus AVD:

  • Target: Google APIs - API Level 15
  • Skin: Built-in WXGA720
Selecting skin sets the following hardware parameters, leave them as-is:
  • Hardware Back/Home: no
  • Abstracted LCD density: 320
  • Keyboard lid support: no
  • Max VM application heap size: 48
  • Device ram size: 1024
Galaxy Nexus has no SD card, just internal memory. Distinction between internal and external storage is important and can affect apps. To simulate this:
  • add SD Card support=no parameter;
  • launch emulator with -partition-size 1024 for 1GB internal memory, or use some other means to increase amount of internal memory available;
If you're working on camera apps, you'll also want to set correct number of cameras, and correct resolution.


To run the Emulator we need to select the AVD from the list and click on the start button. After that unlock the AVD.

To run a project, opening the file in the eclipse. click on h run button form the toolbar. eclipse automatically install the application in the running emulator and will run it.

To get complete Info about Emulator and AVD(Anroid Virtual Device)
http://developer.android.com/tools/devices/emulator.html

From a web search I got teh following link containing the various AVD Configuration:
common Anroid Virtual device configuraiton

No comments: