5 How To: Create and Use an Emulator (AVD)

07 Feb

Emulators, also known as AVDs(Android Virtual Device) allow users to test their apps on different versions and setups of the Android operating system without having an actual physical device present. Here we will explain how to create an emulator, launch it and run your app/project on it. At the end are a few tips on emulators.

Creating an AVD in three steps
It is very easy to create an Android emulator using the Android AVD Manager.

1) From within HAC, load the Android AVD Manager by using the menu Android and option Android Emulators.
The AVD Manager image below shows it with no AVDs created:-

1 Empty AVD Manager

2) To create a new AVD click the New button as shown above and the following window will open.
An AVD needs these options setting:- the name of the AVD, the target Android API to use and the SD Card size in MB as underlined in the picture.

2 Create AVD

3) Once the settings have been filled in then click the Create AVD button and it will open the AVD Manager showing the entry for this newly created AVD:-

3 AVD Manager with AVD present

Running an Emulator
There are two easy ways to run an emulator. Firstly by using the Android AVD Manager as shown above, in which case just highlight the required emulator and click the Start button. Secondly, from within HAC using its Android Device Manager as shown below. This lists all the AVDs known to HAC in the top half of the window and displays running AVDs and Android devices in the the bottom half. To run an emulator just select it from the upper list then use the HAC menu Go and option Launch Emulator.

HAC Manage Devices

Running Project on an Emulator/Device
HAC’s Android Device Manager lists all of the running emulators and Android devices in the bottom list. To run the project on an already running emulator or device just select the target emulator/device from the lower list then use the HAC menu Go and option Run Android.
A Few Tips
(1) An emulator’s first run is very slow and newer APIs can take many minutes to start up.
(2) Emulators like Honeycomb and Ice Cream Sandwich do more and so use more resources, therefore on older PCs don’t run non-essential background apps or the emulator might crawl to a halt.
(3) Some of the newer emulators may occasionally crash or freeze during startup but just try again.
(4) Emulator graphics can be very slow but are still very useful in setting up a game or apps screen layout.
(5) If you need to test your game but don’t have an Android device then use older emulators as they will draw more frames/second, run your code faster and be more responsive.
(6) Emulator keyboards can be problematic so use at least one Android device to check its behaviour.
(7) When creating an emulator ignore the density setting as HAC copes automatically with screen scaling.
(8) Test your app on a range of Android emulators.

Leave a comment

Posted by on 07/02/2012 in How-to


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: