1. Creating Android Virtual Devices (AVD) to provide different conditions and configurations for the application
2. Understanding the different configurations we can specify while creating AVDs
3. How to run AVDs Creating Android Virtual Devices
An Android Virtual Device (AVD) is an emulator that simulates a real-world Android device, such as a mobile phone or Tablet PC. One can use AVDs to test how an application performs on a wide variety of Android devices, without having the gadget.
One can create as many AVDs as they like, each set up with different versions of the Android Platform. For each AVD created, one can configure various hardware properties such as whether it has a physical keyboard, GPS support, the camera resolution etc.
However, it is ideal to run final tests on real devices for various reasons.
1. To start AVD, one needs to install Android SDK
Install Android SDK for windows: http://developer.android.com/sdk/index.html
2. To navigate to AVD, C :\< android-sdk-windows> -> Click on AVD manager
Refer managing AVDs with AVD Manager: http://developer.android.com/guide/developing/devices/managing-avds.html
Market statistics based on screen sizes: http://developer.android.com/resources/dashboard/screens.html
- Click on New button, to create a new AVD
An AVD configuration describes how the emulator should emulate a real device, including:
- What version of the Android platform to emulate (API Level)
- SD Card size and contents
- Hardware details (Camera, Keyboard, Trackball, D-Pad)
- Screen size, density, and resolution.
- The screens sizes can vary from QVGA (240×320), WVGA (480×800), HVGA (320×480), FWVGA (480×854) , in tablets you will find 1024×600 and what probably will be the standard for tablets 1280×800.So running the same application on 240×320 screens and in the same time on 1280×800 screens is huge challenge.
- Android OS versions – The android platform is changing very fast. The difference from version 1.5 to version 2.3 is huge. Lots of new capabilities like graphics HW acceleration were added and can affect your application.
- CPU – Mobile devices in general are very sensitive to processing power. We can see phones with single core running at 600 MHz to phones that have duel core 1200 MHz.
Select the following options, if you wish:
Name: motodroid
Target: Google APIs - API level 10
SD Card Size: 50MiB
Skin: Default (WVGA800)
4. Click on Start AVD
5. Click on ‘Launch’ to get the emulator running
Tip for faster loading of android emulator:
emulator -cpu-delay 0 -no-boot-anim -cache ./cache -scale 0.8 -avd avd_name
Emulator Keyboard shortcuts: http://developer.android.com/guide/developing/tools/emulator.html
List of Android devices: http://en.wikipedia.org/wiki/List_of_Android_devices
Sample AVD configurations listed below:
How to create AVD configurations for popular android devices:
- HTC Evo
HTC Evo:
The important specs of this device from an Emulator perspective are:
- Target platform: Currently Android 2.1
- Screen info: Large screen, high density
- Lack of keyboard and DPad
- Lack of trackball
Therefore, let’s create an AVD configuration called Evo4G:
- Click the “New” button to create a new AVD configuration
- Name the AVD: “Evo4G”
- Select the Target: “Google APIs API Level 7”
- Input the SD Card Size: “8GB”
- Input the Skin Details: “800×480”
- Edit the Hardware Property for Abstracted LCD Density: “217”
- Add another Hardware Property for DPad Support: “No”
- Add another Hardware Property for Keyboard Support: “No”
- Add another Hardware Property for Track-ball Support: “No”
- Save AVD
No comments:
Post a Comment