Testing Devices – Emulator Settings for each Android Density Bucket

Recently I’ve needed to test on a vast range of devices, but we don’t have the physical devices available. I’m always wary of the emulators because they can’t show defects with the software that manufacturers/operators put on top of vanilla android. One thing the emulators are good for is testing the different pixel densities that devices can range in as well as portrait/landscape with these densities.

I’ve already started making a list of devices that will fall into these buckets: see here. and below is a list of different emulator setups to try and catch any bugs that may appear in one specific density.

You can create new virtual devices (emulators) using the Android AVD Manager. This tool is accessible in eclipse / intellij and through the android_sdk/tools folder. Below is how you’ll be creating them.

android virtual device manager

Android LDPI: ( HTC Wildfire )

Target: Google APIs (Google Inc) - API Level 8
SD Card: 
  size: 512mb
Skin: 
  Built In: QVGA
Hardware:
  Abstracted LCD Density: 120

Android MDPI: ( Samsung Galaxy Ace )

Target: Google APIs (Google Inc) - API Level 8
SD Card: 
  size: 512mb
Skin: 
  Built In: HVGA
Hardware:
  Abstracted LCD Density: 160

Android HDPI: ( Google Nexus One )

Target: Google APIs (Google Inc) - API Level 9
SD Card: 
  size: 512mb
Skin: 
  Built In: Default (WVGA800)
Hardware:
  Abstracted LCD Density: 240

Android XHDPI: ( Samsung Galaxy S III )

Target: Google APIs (Google Inc) - API Level 15
SD Card: 
  size: 1024mb
Skin: 
  Built In: WXGA720
Hardware:
  Abstracted LCD Density: 320
  VM application heap size: 48 
  Device ram size: 1024

The main point is the Abstracted LCD Density, this represents the DPI of the device. If you set this correctly your device will have that density of screen.

  • 120 = LDPI
  • 160 = MDPI
  • 240 = HDPI
  • 320 = XHDPI

Footnote:

The reference above ( device ) to what device this is, isn’t saying that the emulator will act the same as that device, it’s just saying it is representative of the screen density for this device.

Enjoy!

4 thoughts on “Testing Devices – Emulator Settings for each Android Density Bucket

  1. Hello! Where did you download design of this blog?
    It is amazing 😉

  2. Hi

    I was wondering — these are great for AVD — but what about in the Graphical Layout Editor itself? You can create “custom devices” in there and I’ve been pulling my hair out for a “custom device” profile for the S3 for the Graphical Layout Editor in Eclipse… any ideas there?

    Jordan

  3. Very nice indeed, I was looking for those HTC specifications in order to test properly my app. Thank you very much sir 🙂

Comments are closed.